Page Frontmatter#

Every page can use these frontmatter parameters to control its behavior in the theme.

---
title: My Page
weight: 10
bookToC: true
bookCollapseSection: true
---
+++
title = 'My Page'
weight = 10
bookToC = true
bookCollapseSection = true
+++
{
  "title": "My Page",
  "weight": 10,
  "bookToC": true,
  "bookCollapseSection": true
}

These parameters control how the page appears in the sidebar menu. Set in page frontmatter.

ParameterDefaultDescription
weightMenu ordering. Lower values appear first. Without weight, pages are sorted alphabetically.
bookHiddenfalseHide the page from the sidebar menu. The page is still accessible by URL.
bookCollapseSectionfalseMake a section collapsible in the sidebar. Subsections are hidden until clicked.
bookFlatSectionfalseDisplay subsection pages at the same level instead of nesting them.
bookHrefOverride the menu link with an external URL.
bookIconDisplay an icon next to the menu entry.

Content Display#

These parameters control page content rendering. Set in page frontmatter.

ParameterDefaultDescription
bookToCShow or hide the table of contents. Overrides the site-level BookToC setting.
bookCommentsShow or hide comments. Overrides the site-level BookComments setting.
bookSearchExcludefalseExclude this page from the search index.

See Blog for post-specific frontmatter.