11

I'm using docusaurus for our dev docs.

How to disable TOC?

enter image description here

Thanks.

Dorr
  • 577
  • 1
  • 8
  • 22

2 Answers2

15

Docosaurus has Markdown Frontmatter metadata fields for .md files where you will eventually make use of the hide_table_of_contents field and set it to true.

Your .md should look like:

--- 
hide_table_of_contents: true
---
# Markdown Features
My Document Markdown content
Gicck
  • 521
  • 3
  • 3
2

There does not seem to be a way to make the hide_table_of_contents setting default to true; you need to add it to the Front Matter for every document if you want to completely disable the ToC display.

Another approach to completely disable the ToC display would be to edit the css, adding:

.theme-doc-toc-desktop {
   display: none;
}