retype icon indicating copy to clipboard operation
retype copied to clipboard

Show an icon next to external links

Open travishorn opened this issue 3 years ago • 1 comments

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!

travishorn avatar Jan 22 '22 15:01 travishorn

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.

geoffreymcgill avatar Jan 22 '22 15:01 geoffreymcgill

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

ddnexus avatar Dec 25 '22 09:12 ddnexus