Skip to content

Override the header to add a custom button to the end of nav #4612

Answered by santaimpersonator
zerenxyz asked this question in Q&A
Discussion options

You must be logged in to vote

Update:

  • The example below was working with mkdocs-material (v8.5.6). I just upgraded to v9.0.9 and now it doesn't 😅
  • Fixed, in v9.0.9 line 29 was updated (not tested - using Insiders)
    • For insiders, you'll also need to include the changes on lines 23 and 34 (works if you include all three line changes)

I actually had to make the modification before the loop to get it to work. (It wouldn't work after the loop because of the unordered list element that is used.)

  • Make sure to save the tabs.html file in the /docs/overrides/partials/ directory, as specified in the documentation
  • Modifications:
    • <relative page link> - Replace with the generated page link for tab
    • <tab title> - Replace with t…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@zerenxyz
Comment options

@santaimpersonator
Comment options

@talwgx
Comment options

@santaimpersonator
Comment options

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