Changelog
The authoritative history is the root CHANGELOG.md (edited by changelogen at release time). This page highlights the current major so beginners know what to expect.
v3.0.0 (current major)
Nuxt 4 primary target with dual Content support.
Breaking (see Breaking changes):
- Peers
nuxt ^3.16 || ^4and@nuxt/content ^2 || ^3. - Config key is now
nuxtToc(not a hyphenated name) withcollection/depth/scrollSpy/rootMargin/smooth/scrollOffset— all stable in this line. CustomQueryremoved — use a page query + pass-in:tocor the new version-specific plugins (fetch-v2/fetch-v3).- Single playground replaced by dual
playgrounds/content-v2+content-v3(separate installs, ports:3001/:3000). - Toolchain is npm (
package-lock.json) with@nuxt/kit >=3.16 <5.
Preserved from v2.x:
- Public styling contract:
#toc-title,#toc-container,.toc-link,.active-toc-item, etc.
Enhancements (see Introduction → How it works):
- Auto-detects Content major via
detectContentMajorand registers exactly one fetch plugin — never both. <TableOfContents>accepts prefetchedpage.body.tocon both majors, depth-limited vialimitTocDepth/resolveEffectiveDepth.- Empty-state UX (
--pending/--empty/--error) + title-only mode,IntersectionObserverwithrequestAnimationFramebatching.
Docs:
AGENTS.mdfor maintainers, VitePress site + GitHub Pages athttps://thaikolja.github.io/nuxt-toc/, slim multilingual READMEs,logo.pngbranding across all surfaces.
Chore:
build.config.ts,eslint.config.ts,sideEffects,publishConfigmetadata, deduped CI docs workflow.
Earlier versions
See CHANGELOG.md in full — including v2.7.x modular props (toc pref, title, empty states), v2.6 styling normalization, and v1.0 playground origins.
For upgrading between majors: Migrating from v2.x and Content v2 → v3 for your app.
