Simplify TOC Generation with
astro-toc-plugin
The astro-toc-plugin is designed to streamline the process of generating SEO fields for your Astro components and pages with minimal configuration.
Key Features
Enhance functionality effortlessly with seamless integration and customizable features.
Deeply Customizable Structure
Generates semantic nested lists, supports custom components via a `use` prop, and lets you set min/max depths and pass arbitrary HTML attributes to the container.
Built for Sanity CMS
Tailored to work seamlessly with Sanity-generated content.
Fully Customizable Styles
Style your ToC with CSS variables to match any brand or theme.
Active Section Tracking
Automatically highlights headings as you scroll — including parent-child relationships.
Smooth Scroll Navigation
Enjoy buttery-smooth scrolling to headings on click.
Supports All Headings
Compatible with h1 through h6 — nothing left behind!
Nested ToC Structure
Automatically nests subheadings for clear hierarchy.
Per-Level Styling
Apply unique styles to each heading level.
Accurate Scroll Sync
Keeps the ToC perfectly in sync with scroll position.