Skip to content

Material UI in docusaurus #8902

Discussion options

You must be logged in to vote

Got Solved in Discord by userdocs

Create a file in src/theme/NavbarItem/ComponentTypes.js to add a custom navbar item type to the existing mapping,

import ComponentTypes from '@theme-original/NavbarItem/ComponentTypes';
import ExternalLinkButton from '@site/src/components/Buttons/BasicButton.jsx';

export default {
  ...ComponentTypes,
  'custom-myAwesomeNavbarItem': ExternalLinkButton,
};

Add this to Docusaurus.config.js in items

 {
      type: "custom-myAwesomeNavbarItem",
      position: "right",
  },

I don't know but, custom href is 2-3 sec slow than Docusaurus href

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@slorber
Comment options

slorber Apr 21, 2023
Collaborator

Answer selected by MaheshReddy-05
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants