-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable toc #478
Comments
@nodesocket did you find a solution to this? |
Just remove |
There are currently no extensions listed in my
What am I missing? |
Oh, that's right. I found this issue on the MkDocs tracker: mkdocs/mkdocs#454. Also see the linked issue. Currently MkDocs and Python Markdown provide no options to hide the toc, so it's always rendered. You can, however, use CSS to hide it quickly: .md-sidebar--secondary {
display: none;
} |
Okay yeah, I had commented out the toc block from My underlying issue is that I'd like Is there a reasonable means of getting the inner content to expand into the |
@connercowling @media only screen and (min-width: 60em) {
.md-content {
margin-right: 0;
}
} |
@makshh works great. Much appreciated. |
@max-ci @connerxyz @squidfunk Hi. I am new to this web designing stuff. Where do we have to add max-ci code (and /or squidfunk's code ?) so as to remove toc and use that space with our center content ? I tried adding in mkdocs.yml but got no success. |
It's explained in the customization guide. |
Is there any way of embedding such code but only in certain .md files - not for every page? |
Thanks for your nice comments on this topic. After I added the CSS I sometimes saw a flickering with the TOC disappearing after 200ms so I also added a constraint for only rendering heading #1 which is basically like saying don't render anything since the TOC starts at heading #2
|
Thank you, it works! |
@connerxyz I have the same requirement with you, I need add the space for md-content__inner to hold the table. Where did you make the changes on md-content__inner, I add the below into the extra.css, but it doesn't work. And is there a way to make it take effect just on some pages. |
for me
and
worked well in 1.4.2 version |
I think I found a solution. You can manually put this code block in your .md files to prevent the toc from appearing.
https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#hiding-the-sidebars |
Is there an option to disable
Table of contents
on all page?The text was updated successfully, but these errors were encountered: