Automatically adding an external link icon next to URLs outside of Zendesk | Community
Skip to main content

Automatically adding an external link icon next to URLs outside of Zendesk

  • June 13, 2023
  • 1 reply
  • 0 views

Nicole18


I would like to add an external link icon next to all links to external URLs in our Zendesk Guide theme (like the icon next to the Preview link in the Guide Admin)

I expect this can be done with CSS or JS but have been unable to get a couple of examples (of JS and CSS implemented outside of Zendesk) to work. I'm hoping someone has done this before and can share some info. We are customising the Copenhagen theme.

Thanks for your help :)

1 reply

Nicole18
  • Author
  • June 13, 2023

I figured it out! I added the following code to style.css 

a:not([href*='domain.com']):not([href^='#']):not([href^='/']):after {
  /* Set the `content` property */
    content: ' \f08e';
    font-family: 'FontAwesome';
}