Make document step by step
- Add a document menu to the navigation bar. You can add it in the
menus.en.toml
file.1 2 3 4 5 6
... [[main]] identifier = "docs" name = "Docs" url = "docs" weight = 1
- Make a
docs
folder in your content root folder. The namedocs
is because I made the folder in step 1. - Make a
_index.md
file in thedocs
folder.1 2 3 4 5 6
--- title: "Docs" description: "My first documentation" date: 2020-10-20T14:09:21+09:00 draft: false ---
- Now, you can make some markdown files in the docs folder.
1 2 3 4 5 6 7 8 9 10
--- title: "Installation" date: 2020-10-20T00:38:25+09:00 description: Installation description draft: false weight: 1 enableToc: true tocLevels: ["h2", "h3", "h4"] --- Your contents here.
- But, you probably want to categorize your contents. Let’s say, you want to make a
userguide
folder to categorize your contents. Make the folder first, and then make a_index.md
file there.1 2 3 4 5 6 7 8
--- title: "User Guide" date: 2020-01-30T10:10:56+09:00 draft: false collapsible: true weight: 3 --- ...
There is a
collapsible
Front-Matter. When it is true, that markdown file becomes a collapsible menu. Now, you can make some markdown files in the userguide folder like this.1 2 3 4 5 6 7 8 9 10
--- title: "Search" description: "This is a search documentation" date: 2020-10-20T01:27:35+09:00 draft: false weight: 7 enableToc: true tocLevels: ["h2", "h3", "h4"] --- ...