All configurations on docs content type. The blog and docs content types share most of their page and section fields, so the documented below are separate into unique fields and common fields. These are theme parameters so the fields should goes under params key.
Page configuration
Unique fields
Accepted fields for individual pages of type docs. If the Front Matter column shows ❌, the field cannot be overridden via front matter.
| Name | Type | Front Matter | Description |
|---|---|---|---|
sourceLinks | []object | A list of source files shown at the bottom of the page. Each entry accepts path (relative to the site's source repository) and an optional label and url to override the auto-generated link1. | |
docsNavCollapsed | boolean | Collapse this section by default in the sidebar navigation. Only applies to section pages. | |
docsAutoCollapseCategories | boolean | ❌ | Auto collapse all sibling sections when expanding one. |
docsIcon | string | Icon shown next to this page or section in the sidebar navigation. | |
docsNavClass | string | Additional CSS class applied to the sidebar nav. |
Note
Previous/next links on docs pages only traverse other pages within the same docs section, unlike blog's previous/next links, which span the entire site.
Common fields
| Name | Type | Front Matter | Description |
|---|---|---|---|
link | boolean | URL link to any internal or external page. | |
breadcrumb | boolean | Show breadcrumb navigation above the page title. | |
pageHeroStyle | string | Render a hero section above the page. Set to disable to turn it off for a specific page. | |
pageTOCStyle | string | Where the table of contents is rendered. Accepts top, sidebar, or disable. On docs pages, top is treated the same as sidebar. | |
pageKgStyle | string | Where the knowledge graph widget is rendered. See Knowledge Graph for what this widget does. | |
pageShowActions | boolean | Show action buttons (e.g. share, copy link) next to the page title. | |
pageShowMeta | boolean | Show publish date, last-updated date, and author info below the title. | |
pageShowAuthors | boolean | Show author information. Only takes effect when pageShowMeta is enabled. | |
pageShowCategories | boolean | Show the page's categories below the content. | |
pageShowTags | boolean | Show the page's tags below the content. | |
pageShowNext | boolean | Show previous/next page links at the bottom of the page. | |
pageShowBacklinks | boolean | Show a list of pages that link back to this one. | |
pageShowStaleWarning | boolean | Show a warning when an article has not been updated in pageStaleDays. | |
pageStaleDays | int | Number of days before an article is considered stale. | |
pageNoList | boolean | Exclude this page from search indexing and from list views. | |
Section configuration
Unique fields
The section fields of docs type is exactly the same as blog type.
Common fields
| Name | Type | Front Matter | Description |
|---|---|---|---|
breadcrumb | boolean | Show breadcrumb navigation above the page title. | |
listScope | string | Which pages to list. Set to site to list every regular page on the site, or leave unset to list only pages within the current section. | |
sectionGroupBy | string | Group listed pages under headings. Accepts Date, ExpiryDate, Lastmod, PublishDate, or a page parameter prefixed with Param. (e.g. Param.category). Leave unset to disable grouping. | |
sectionGroupLayout | string | Date format used for group headings when sectionGroupBy is a date field. See layout strings. | |
sectionGroupOrder | string | Order of groups. Accepts asc or desc. | |
sectionSortBy | string | Sort key for listed pages within each group. Accepts Date, ExpiryDate, Lastmod, Length, LinkTitle, PublishDate, Title, Weight, or a page parameter prefixed with Param.. | |
sectionSortOrder | string | Sort order. Accepts asc or desc. | |
For example:
↩︎sourceLinks: - path: "layouts/_partials/page/" url: https://github.com/ZhenShuo2021/hugo-yore/tree/main/layouts/_partials/page