Site structure
The documentation site is built using markdown files in the /docs/src/routes/
folder of our application repository, and the documentation navigation
reflects that structure.
There are 3 things to be aware of when creating pages:
- folders
- every page requires a
+page.md
file with the content for that page - a folder can contain any number of other folders
- every page requires a
- page files
- a page file contains the content for the URL of its containing folder. i.e. an
file at
/foo/bar/+page.md
will be accessible athttp://about.hugosystems.tech/foo/bar
- a page file contains the content for the URL of its containing folder. i.e. an
file at
- always follow our naming conventions when creating folders and pages
For example:
src/routes
├── contributing/+page.md <= 'contributing' page
├── documentation <= folder
│ ├── +page.md <= documentation index page
│ ├── creating-pages/+page.md <= 'creating pages' page
│ └── ...
├── ...
└── folder-a <= folder
├── folder-b <= folder
│ └── ...
└── ...
Navigation
The navigation is built using a combination of the folders and markdown files, and the contents of the markdown files.
The text in each navigation item is obtained by getting the first heading of the page the navigation item belongs to, otherwise it will output the name of the file linking to that page.
Every page should have an h1
heading. For information on the order of
navigation items, see Navigation frontmatter.