Create a doc
Create a Markdown file, greeting.md
, and place it under the docs
directory.
website # root directory of your siteโโโ docsโย ย โโโ greeting.mdโโโ srcโย ย โโโ pagesโโโ docusaurus.config.jsโโโ ...
At the top of the file, specify id
and title
in the front matter, so that Docusaurus will pick them up correctly when generating your site.
---id: greetingtitle: Hello---
## Hello from Docusaurus
Are you ready to create the documentation site for your open source project?
### Headers
will show up on the table of contents on the upper right
So that your users will know what this page is all about without scrolling down or even without reading too much.
### Only h2 and h3 will be in the toc
The headers are well-spaced so that the hierarchy is clear.
- lists will help you- present the key points- that you want your users to remember - and you may nest them - multiple times
### Custom id headers {#custom-id}
With `{#custom-id}` syntax you can set your own header id.
This will render in the browser as follows:
Hello from Docusaurus
Are you ready to create the documentation site for your open source project?
Headers
will show up on the table of contents on the upper right
So that your users will know what this page is all about without scrolling down or even without reading too much.
Only h2 and h3 will be in the toc
The headers are well-spaced so that the hierarchy is clear.
- lists will help you
- present the key points
- that you want your users to remember
- and you may nest them
- multiple times
- and you may nest them
Custom id headers#
With {#custom-id}
syntax you can set your own header id.
note
All files prefixed with an underscore (_
) under the docs
directory are treated as "partial" pages and will be ignored by default.
Read more about importing partial pages.
Doc tags#
Optionally, you can add tags to your doc pages, which introduces another dimension of categorization in addition to the docs sidebar. Tags are passed in the front matter as a list of labels:
---id: doc-with-tagstitle: A doc with tagstags: - Demo - Getting started---
tip
Tags can also be declared with tags [Demo, Getting started]
Read more about all the possible Yaml array syntaxes.