Add Icons to External Links
1 min read
This guides shows how to add icons to the end of each external link, so that visitors will know they are leaving your site.
Steps by steps
Section titled Steps by steps-
Start by installing the
rehype-external-links
↗ package using your favorite package manager: -
Import the plugin into your
astro.config.mjs
file:You can add rel (and target) to external links like this:
Example
Section titled ExampleThe code above generates the following on the page: