interface HeadingAnchorsOptions

Options for the heading anchors processor.

Properties

optional
level: number

Minimum heading level to process (e.g., 2 for h2 and below)

optional
maxLevel: number

Maximum heading level to process (e.g., 4 for up to h4)

optional
containerSelector: string

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

optional
tabIndex: number | false

Value of the tabindex attribute on headings, set to false to disable

optional
anchorPosition: "inside" | "outside"

Position of the anchor link relative to heading

  • "inside": Wrap heading text in anchor link
  • "outside": Place anchor link after heading text
optional
anchorClass: string

CSS class to add to anchor links

optional
anchorSymbol: string

Symbol to use for anchor link

optional
ariaLabel: string

aria-label text for anchor links (for accessibility)

optional
includeTemplateEngines: string[]

Only process pages using these template engines

optional
slugify: (text: string) => string

Custom slugify function If not provided, uses Lume's built-in slugifier