par

Adding the external link icon on my blog

A CSS snippet to put in the theme editor so that external links have a ⧉ next to them. Replace alexsirac.com with your own domain and add or remove the subdomains at will. Of course you can also easily replace the icon.

.entry-content a[href]:not(:where(
/* exclude hash only links */
[href^="#"],
/* exclude relative but not double slash only links */
[href^="/"]:not([href^="//"]),
/* domains to exclude */
[href*="//alexsirac.com"],
/* subdomains to exclude */
[href*="//SUBDOMAIN.alexsirac.com"],
)):after {
content: ' ⧉ '
}
a {
text-decoration: underline;
}

❤️

Commentaire / Comment

Commenter