-
I have
but that seemed to have no effect. Any suggestions? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
You can use a CSS .md-nav__item--active .md-nav__list {
display: none;
} The result - two times the same page: Without TOCWith TOCIt looks like the bottom margin of the page with the omitted TOC is a bit too large in the sidebar, but you can probably fix this with some additional inline CSS on the page in question. Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Hi @ccmao1130, The You could maintain a customization of the template to prevent the integration: mkdocs-material/src/templates/partials/nav.html Lines 30 to 32 in 646c7ab You'd replace the {% if "toc.integrate" in features and not (page.meta and page.meta.hide and "toc" in page.meta.hide) %}
{% set class = class ~ " md-nav--integrated" %}
{% endif %} Modifying templates like that adds some maintenance in the future to make sure they're compatible with new versions. |
Beta Was this translation helpful? Give feedback.
-
Thanks all for chiming in! I ended up using css to hide it on a specific page as suggested:
|
Beta Was this translation helpful? Give feedback.
You can use a CSS
<style></style>
block like the following on every page where you want to hide the integrated TOC and add the following CSS:The result - two times the same page:
Without TOC
With TOC
It looks like the bottom margin of the page with the omitted TOC is a bit too large in the sidebar, but you can probably fix this with some additional inline CSS on the page in question.
Hope that helps!