Post Table of Contents

An index of the post's own headings, with working anchors and a marker that follows the reader. It is shown in the block inserter as Post Table of Contents and registered as canvas-core/post-toc.

Select the block on a page and its own settings open in the sidebar, in the panels below:

The Post Table of Contents settings in the block editor sidebar

Settings

Each setting is named exactly as the block editor names it, followed by what it does and what it starts as. Where a setting carries a Shown when line, it stays hidden until that condition is met, which is the usual reason a setting looks missing from the sidebar:

Settings

  • HeadingDefaultOn this page

    Small caption above the index. Empty hides it.

  • Read Headings FromDefault.entry-content

    Names the part of the page whose headings the contents list is built from. Narrow it when a sidebar or a footer would otherwise contribute entries.

  • Heading LevelsDefaulth2, h3

    Which heading levels become entries, separated by commas. Deeper levels are indented under the one above, so listing fewer gives a shorter, flatter index.

  • Scroll Offset (px)Default120

    How far above the heading the page stops, so a sticky header does not cover it.

  • Container ClassesDefaultpost-toc

    Classes on the index container. This is what makes it stick beside the article.

Every Canvas block also carries the Animation, Scroll Effects and Advanced panels, which are described in Controls every Canvas block has.

Other blocks in Posts: Blog Archive Loop, Blog Loop, Blog Single Post, Post Archive Index, Post Author, Post Comments.

Was this page helpful?