
Adding a sticky table of contents to an Astro blog
Build-time heading extraction, sticky sidebar, and an IntersectionObserver active state
How I added a sticky table of contents sidebar to every blog post on this site, using Astro's built-in headings prop for build-time rendering and an IntersectionObserver to highlight the active section as you scroll.







