-
Notifications
You must be signed in to change notification settings - Fork 94
Description
I've noticed that there is a function for rendering the icon for mastodon here:
Line 426 in 571a875
| function IconMastodon() { |
However, when I add it to the links as shown in the readme, for example:
links: [
{ title: "Email", url: "mailto:bot@deno.com" },
{ title: "GitHub", url: "https://github.com/denobot" },
{ title: "Twitter", url: "https://twitter.com/denobot" },
{ title: "Mastodon", url: "https://somethingotherthanmastodon.social/@denobot"},
],It's not going to render.
This is a problem, in general, and for me personally because mastodon is a decentralized network and isn't owned by mastodon.social, and the icon will not render for a different url. This is because of the code snippet:
const icon = socialAppIcons.get(
url.hostname.replace(/^www\./, ""),);In the source here:
Line 79 in 571a875
| const icon = socialAppIcons.get( |
Which uses a regex to get the name of the social media site from the url to pass to the socialAppIcons function.
I can understand some possible reasons we want to use the url here, but couldn't we just use the title instead? I would issue a pull request but I wanted to understand the mainters' intention here before starting one.