Yore provides a docs layout for deep documentation. It uses a 3-column structure with a section sidebar, content area, and on-page table of contents.
Setup
Directory-based
Place your Markdown files under content/docs/. Hugo automatically assigns the docs type to all pages in that directory.
cascade
To apply the docs layout to paths outside content/docs/, use cascade. Set it in hugo.yaml to target arbitrary path patterns, or in a section's _index.md to scope it to that section.
hugo.yaml
cascade:
- type: docs
target:
path: '{/shortcodes,/shortcodes/**}'content/shortcodes/_index.md
---
title: Shortcode Section
cascade:
type: docs
---Options
Section (_index.md)
| Field | Description |
|---|---|
params.docsNavCollapsed | Collapses the section navigation by default when set to true |
linkTitle | Short title displayed in the docs sidebar instead of the full page title |
Page (index.md)
| Field | Description |
|---|---|
params.docsIcon | Icon shown next to the entry in the docs sidebar |
params.docsIconClass | CSS classes applied to the icon wrapper element |
params.sourceLinks | List of source file links displayed at the bottom of the page. See below. |
linkTitle | Short title displayed in the docs sidebar instead of the full page title |
sourceLinks
Each entry in params.sourceLinks is a map with the following fields.
| Field | Description |
|---|---|
path | Relative path to the source file. Combined with site.Params.sourceBaseURL to build the URL. |
url | Absolute URL to the source file. Takes precedence over path when both are set. |
label | Display label for the link. Defaults to the file name from path or url. |
Acknowledgement
A large part of Yore's docs layout is built upon the solid foundation of Docusaurus.