For what it’s worth, I made a change to this code on my Replies page that I like.
I was dissatisfied with replies to Mastodon users only showing their hostname (mastodon.social
, social.lol
, etc.) and not their usernames. So I removed the if/else
statement and used the {{ .Params.reply_to_username }}
bit for every reply, not just replies to Micro.blog users.
Here’s the new code:
<!-- REPLYING TO LINK -->
{{ if .Params.reply_to_url }}
<div class="reply_to">
Replying to: <img src="{{ .Params.reply_to_avatar }}" width="22" height="22" style="width: 22px; height: 22px; vertical-align: top; border-radius: 11px; padding: 0px; display: inline;" alt="{{ .Params.reply_to_username }}" />
<a href="{{ .Params.reply_to_url }}" class="u-in-reply-to">@{{ .Params.reply_to_username }}</a>
</div>
{{ end }}
(Note that my implementation includes the avatar image for the user I’m replying to.)
Before:
And after:
In my opinion, this makes it way more clear who I’m replying to. And it has the added benefit of fixing the username of replies to my own posts, which were showing the hostname instead of my username even though they’re through Micro.blog.
Maybe this will cause problems if I’m replying to a regular blog post instead of an ActivityPub post, but I haven’t seen any issues yet.