Skip to content
CelPlume
↑↓select·Enteropen·EscclosePowered by Pagefind
ZH
On this page

Heading

Anchored headings with hover copy-link buttons.

heading() renders an anchored heading: clicking the text jumps to the anchor, a ghost copy button appears on hover/focus and copies the #<id> link.

heading(2, 'Installation', { id: 'installation' });
heading(3, 'From source', { id: 'from-source' });
heading(3, 'From registry', { id: 'from-registry' });
data-cpd-step flag
heading(2, 'Create the account', { id: 'create-account', step: true });
level1–6
Heading level (first argument).
textstring
Heading text (second argument).
idstring
Anchor id — also used by the copy-link button.
stepboolean
Marks the heading as a Plumest TOC step (data-cpd-step).
  • The anchor link is href="#<id>"; the copy button copies the absolute location.origin + pathname + #<id> URL.
  • step headings render with a step badge in the article and get a numbered badge in the Plumest TOC.