Hugo Narrow provide common function by dock, include back to top, back to previous page, jump to comments, search, table of contents.
Dock has three display modes:
scroll: show on scroll upalways: always visiblefloat: show on floating
yaml
dock: "scroll" # scroll | always | floatTable of Contents
The parameters of table of contents could cover by posts frontmatter.
IMPORTANT
In the initial design, the table of contents was displayed in the middle of the page and controlled via the Dock, which aligns with the theme’s design philosophy and ensures consistent performance across different devices. However, multiple issues requesting a sidebar table of contents were submitted, so support for the sidebar table of contents and the parameter for configuring its position were added in version 1.2.
yaml
toc:
enabled: true
position: "center" # center | side