teknologi-umum / blog

Blog for Teknologi Umum
https://teknologiumum.com/?utm_source=github
24 stars 25 forks source link

Add Mastodon as one of socials for Author Card #153

Open aldy505 opened 11 months ago

aldy505 commented 11 months ago

Currently we have GitHub, Telegram, and Twitter on every author card just below the author's name in every blog post.

Now since some people are moving to Mastodon to expand their audiences, or because some people prefer Mastodon as it's more FOSS than Twitter (or for whatever reason), we should support it.

We should add another prop on the AuthorCard component, the value should be @username@host. For example: @mustafasegf@hachyderm.io. The link then should be parsed to https://hachyderm.io/@mustafasegf.

https://github.com/teknologi-umum/blog/blob/1a9e8ce5117fe016c88c6a8a746d21b725b8148f/components/AuthorCard.tsx#L6

One edge case: It should also handle multiple @ (at) points. Like @moepoi@moe.onl@social.gnuweeb.org, it should be parsed to https://social.gnuweeb.org/@moepoi@moe.onl