Skip to content
Discussion options

You must be logged in to vote

Are you trying to add Logo icon? You can pass:

navbar: {
  title: "My website title",
  hideOnScroll: true,
  logo: {
    alt: "Logo",
    src: "img/favicon.ico",
  },
...
}

You can also add icon to any navbar item by targeting CSS. Here is a Nav item with classname header-github-link:

{
  href: 'https://github.com/facebook/docusaurus',
  position: 'right',
  className: 'header-github-link',
  'aria-label': 'GitHub repository',
},

Then you can apply style in your custom.css:

.header-github-link:hover {
  opacity: 0.6;
}

.header-github-link::before {
  content: '';
  width: 24px;
  height: 24px;
  display: flex;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='htt…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@reeceatkinson
Comment options

@pranabdas
Comment options

@reeceatkinson
Comment options

Answer selected by reeceatkinson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants