# Table of Contents

> Auto-generated nested table of contents from Portable Text headings.

Source: https://emdashcmseverything.com/plugins/tocgen/

- Category: Content
- Status: available
- Version: 0.3.0
- Price: Unknown
- Compatibility: EmDash CMS
- License: MIT
- Maintainer: PlugDash
- Download: https://www.npmjs.com/package/@plugdash/tocgen
- Repository: https://github.com/plugdash/plugdash
- Published: 2026-04-05

Long posts deserve navigation. Automatically generates a nested table of contents from Portable Text headings. Ships a companion Astro component that works with no configuration.

## Installation

```bash
pnpm add @plugdash/tocgen
```

Register in your EmDash config and use the provided Astro component in your templates.

## Usage scenarios

- **Long-form content** — help readers find what they came for.
- **Documentation sites** — automatic navigation from heading structure.
- **Knowledge bases** — consistent ToC without manual maintenance.
