Dorr
Dorr

Reputation: 654

Docusaurus - How to remove TOC(table of contents)?

I'm using docusaurus for our dev docs.

How to disable TOC?

enter image description here

Thanks.

Upvotes: 14

Views: 4273

Answers (2)

Owen Garrett
Owen Garrett

Reputation: 29

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;
}

Upvotes: 2

Gicck
Gicck

Reputation: 571

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

Upvotes: 19

Related Questions