Page Table of Contents
Page Table of Contents
Turn a long page into a scannable set of anchored sections.
What it does
A generated list of a page's headings, with anchor links and an indicator for the section currently in view.
How it works
- 1 Generate the table from the headings actually rendered on the page. Do not maintain a hand-written list beside the content — it will drift.
- 2 Derive stable anchor ids from heading text, and disambiguate repeated headings deterministically so a shared link keeps pointing at the same section.
- 3 Offset every jump by the height of any sticky header, so the target heading is not hidden underneath it.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/page-table-of-contents