property HeadingAnchorsOptions.containerSelector

CSS selector to limit heading extraction to a specific container Useful to exclude headings from sidebars, navigation, etc.

Examples

Example 1

"article" - only headings inside <article> tags

Example 2

"#main-content" - only headings inside element with that ID

Type

string

Usage

import { type HeadingAnchorsOptions } from ".";