Skip to content

Overriding HTML templates #3398

Discussion options

You must be logged in to vote

That's really a question for the Material for MkDocs discussion board, as the theme defines the HTML partials that are rendered into the final website.

But anyway, the toc.html partial is included in both the content of the page and in the navigation, because toc in the navigation is being shown when the page is in mobile / portrait mode.

https://github.com/squidfunk/mkdocs-material/blob/929fc39dbe67dd5a2044636c81028270679d9213/material/templates/base.html#L177
https://github.com/squidfunk/mkdocs-material/blob/929fc39dbe67dd5a2044636c81028270679d9213/material/templates/partials/nav-item.html#L124

So basically to focus on the toc in the content on the right side, you need to override the b…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

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

Answer selected by MyNameIsNeXTSTEP
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