retypeapp / retype

Retype is an ✨ ultra-high-performance✨ static site generator that builds a website based on simple text files.
https://retype.com
Other
1.06k stars 204 forks source link

Show an icon next to external links #260

Open travishorn opened 2 years ago

travishorn commented 2 years ago

A nice feature would be showing an icon next to external links in page content.

This is not mandatory, but it is a common pattern in online documentation. A standard external link looks something like https://octicons-primer.vercel.app/octicons/link-external-16

I have many interconnected pages on my site. And then I have some external links. I'd like to be able to indicate to the reader that they will be leaving my site if they follow those external links.

One solution I can think of is to manually add an icon next to each external link. However, I think it's possible that Retype could determine which links are external and automatically insert the icon. Of course, this feature could be enabled/disabled within project configuration.

Thanks!

geoffreymcgill commented 2 years ago

Hi @travishorn. Thanks for the feature request. I too have wanted this feature. We should be able to make this easily. Just working out a good config name(s) would be the most challenging task.

Retype would add the link-external icon to any external link, prefixed with a protocol (https|http) that does not match the url.

ddnexus commented 1 year ago

While at it, it would be VERY useful to have a global option to set the external links target:blank.