Skip to content

Let themes and plugins register blocks as Table of Contents heading sources #80787

Open

Description

@getdave

Part of #42229. Depends on #80781.

What

Extend the heading resolver class (#80781) so themes and plugins can register their own blocks as heading sources, alongside the core Heading block.

Why

Content isn't always built with the core Heading block. Themes and plugins ship their own blocks that produce heading-like elements, and today the heading resolver class has no way to know about them. Without an extension point, any content built with a third-party block is invisible to the table of contents, no matter how the rest of the stabilization work turns out.

How

  • Add a registration mechanism for themes and plugins to declare a block as a heading source.
  • Make sure a registered heading source behaves consistently with the core Heading block wherever the resolver already looks for headings (a single post, a referenced entity, and so on).
  • Leave unregistered, heading-like blocks alone, so a block that merely looks like a heading isn't picked up by accident.

Activity

  1. added
    [Type] Task
    [Block] Table of contents (experimental)
    on Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Table of contents (experimental)[Type] Task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions