PageToc live example
An empty page, ready for client headings
This page has no server-rendered h1, h2 or h3. Its frontmatter sets layout.showToc: always, so the table of contents starts with “No sections yet.” Open on this page if the panel is collapsed.
Add a section and follow its TOC link. The section uses the textbox value, then the textbox advances to the next name by adding or incrementing its trailing number. Rename, reorder, exclude or remove sections. Turn off automatic refresh to see that the TOC changes only when you explicitly refresh it. Clear everything to return to the empty state; the textbox keeps its current value.