Headings
#
Markdown headingsYou can use regular Markdown headings.
Markdown headings appear as a table-of-contents entry.
#
Heading idsEach heading has an id that can be automatically generated, or explicitly specified.
Heading ids allow you to link to a specific document heading in Markdown or JSX:
#
Generated idsBy default, Docusaurus will generate heading ids for you, based on the heading text.
### Hello World
will have id hello-world
.
Generated ids have some limits:
- The id might not look good
- You might want to change or translate the text without updating the existing id
#
Explicit idsA special Markdown syntax lets you set an explicit heading id:
tip
Use the write-heading-ids CLI command to add explicit ids to all your Markdown documents.