X Enterprises
nuxt-x-blog

TableOfContents

Auto-generated table of contents for blog post pages.

TableOfContents

The XBLTableOfContents component renders a sticky sidebar navigation list built from the heading structure of the current post. Controlled by the showTableOfContents flag in xBlog app config.

Components

<XBLTableOfContents />

Pass the body of the post returned by Nuxt Content. The component extracts headings and highlights the active section as the user scrolls.

<XBLTableOfContents :post="post" />

Props

PropTypeDefaultDescription
postBlogPostrequiredFull post object including parsed body from Nuxt Content
titlestring'On This Page'Section heading above the TOC list
maxDepthnumber3Maximum heading depth to include (h2 = 2, h3 = 3, etc.)

AI Context

component: XBLTableOfContents
package: "@xenterprises/nuxt-x-blog"
use-when: Sticky sidebar navigation for headings on a blog post page
Copyright © 2026