Automatically builds a navigable table of contents from a post's headings (H2–H6), displayed at the top of long articles.

Used in production on docs.vvveb.com.

Behavior

  • Scans post content for headings and generates anchor links
  • Clicking an entry scrolls to the section; the current section is highlighted while scrolling
  • Long posts become easier to scan, which also helps search engines show jump links