Custom Header Links (icons)

For Linkedin you can use fab-linkedin as the icon name in this setting

setting for links

but since that icon is not included in the default set of icons that Discourse uses, you will also need to add it to the other setting in the component.

The result looks like this for me

linkedin icon

Sure, there’s a section in this topic about adding custom icons.

Once you have that setup, you’ll be able to use any custom icons you add in this theme component. Please have a look there and let me know if you run into any issues.

I’ve made that change along with a couple of other implementation improvements here

The new update adds unique prefixed classes to each link based on the title you use. So, for example if you use

facebook, fab-facebook, https://facebook.com, vdm, blank

the link will have the class

header-icon-facebook

The template is header-icon-ICON-TITLE

Which you can then target with CSS like so

.d-header-icons {
  .header-icon-facebook svg {
    fill: #4267b2;
  }

  .header-icon-twitter svg {
    fill: #1da1f2;
  }

  // add more icons here
}

which would result in something like this

colored icons

4 Likes