Sidebar

Last Edit: 2026-06-09

Render sidebar on page as a Bootstrap offcanvas element.

For home and section pages this will include links and sub-links to section content. For single pages this will include a table of contents of the page.

Usage

Partial

{{ partial "sidebar" . }}

Configuration

Can be configured in the params.toml file.

[sidebar]TypeDefaultDescription
homeboolfalseToggle sidebar on home page.
sectionboolfalseToggle sidebar on section pages.
singleboolfalseToggle sidebar on single pages.
tableofcontentsIDstringsb-tocID to assign table of contents wrapper.

References

1 2


  1. The Hugo Authors. “Sections .” 2026. ↩︎

  2. The Hugo Authors. “TableOfContents .” 2026. ↩︎