A flexible and customizable Table of Contents (ToC) generator component for Astro. Automatically builds nested navigation from your data, perfect for blogs, documentation, and content-rich sites.
- Generates semantic, nested lists (
ul
,ol
,menu
). - Supports custom Astro components for rendering items via the
use
prop. - Control over minimum (
depth
) and maximum (maxDepth
) levels shown. - Accepts standard HTML attributes (
class
,data-*
, etc.) for styling the container. - Fully typed with TypeScript.
astro-toc
usage instructions, examples, and the full API reference can be found in its dedicated README:
Give astro-toc
a try on:
Licensed under the ISC License.