On this page
Heading
Anchored headings with hover copy-link buttons.
Last updated:
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.
Levels
Section titled “Levels”h2 and h3
heading(2, 'Installation', { id: 'installation' });heading(3, 'From source', { id: 'from-source' });heading(3, 'From registry', { id: 'from-registry' });Step headings
Section titled “Step headings”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 absolutelocation.origin + pathname + #<id>URL. stepheadings render with a step badge in the article and get a numbered badge in the Plumest TOC.