Documentation Sites

Build structured, multi-section documentation using top-level tabs, collapsible sidebar groups, breadcrumbs, TOC scrollspy, and prev/next navigation.

Setting Up the docs Collection

@nuxtify/cms ships with a full documentation engine enabled out of the box—the very same engine powering this site. To activate it, register the docs collection in content.config.ts using docSchema:

// content.config.ts
import { defineCollection, defineContentConfig } from '@nuxt/content'
import { docSchema } from '@nuxtify/cms/content'

export default defineContentConfig({
  collections: {
    docs: defineCollection({
      type: 'page',
      source: 'docs/**',
      schema: docSchema,
    }),
  },
})

You don't need any extra configuration in nuxt.config.ts to use the default /docs prefix. Only add a nuxtifyCms.content.docs block when you want to rename the URL prefix, disable docs, or tweak TOC, prev/next, or Schema.org defaults:

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxt/content', '@nuxtify/cms'],

  nuxtifyCms: {
    content: {
      docs: {
        enabled: true,
        routePrefix: '/docs', // Set overrides in nuxt.config.ts
        title: 'Docs',
        description: 'Product guides and API reference.',
        schemaType: 'TechArticle',
        toc: {
          enabled: true,
          title: 'On this page',
        },
        prevNext: {
          enabled: true,
        },
      },
    },
  },
})

Directory Structure & Numeric Ordering

@nuxtify/cms turns your content/docs/ folder hierarchy into navigation automatically. Prefix directories and files with numbers (1., 2., 3.) to control their display order—Nuxt Content strips the numeric prefixes from public URLs:

content/docs/
├── 1.getting-started/
│   ├── .navigation.yml
│   ├── 1.introduction.md   -> /docs/getting-started/introduction
│   └── 2.installation.md   -> /docs/getting-started/installation
├── 2.guides/
│   ├── .navigation.yml
│   └── 1.customization/
│       ├── .navigation.yml
│       └── 1.theming.md    -> /docs/guides/customization/theming
└── 3.reference/
    ├── .navigation.yml
    └── 1.configuration/
        ├── .navigation.yml
        └── 1.options.md    -> /docs/reference/configuration/options

How folders map to the UI depends on nesting depth:

  • Flat structure (no subfolders): DocsTabs stays hidden and all pages render directly in DocsSidebar.
  • Top-level folders (1.getting-started/, 2.guides/, 3.reference/): Become horizontal category tabs in DocsTabs.
  • Nested subfolders (1.customization/, 2.content/): Become collapsible sidebar groups inside DocsSidebar for the active tab (supports recursive nesting).

On smaller viewports, DocsMobileBar automatically replaces the desktop sidebar and right-hand table of contents with a compact sticky bar and slide-over menu.

Configuring Labels & Icons with .navigation.yml

Drop a .navigation.yml file inside any folder to customize its tab or sidebar group label and Material Design icon:

# content/docs/1.getting-started/.navigation.yml
title: Get Started
icon: mdi-rocket-launch-outline
# content/docs/2.guides/1.customization/.navigation.yml
title: Customization
icon: mdi-palette-outline

@nuxtify/cms automatically excludes .navigation.yml metadata items from pages, sitemap.xml, and search indexing (robots: false).

Root /docs & Folder Auto-Redirects

You do not need to create an index.md inside content/docs/ or inside every subfolder:

  • Omit index.md (recommended for most sites): Visiting /docs or a folder URL like /docs/guides automatically redirects (302) to the first navigable leaf document in that subtree (for example, /docs/getting-started/introduction).
  • Include index.md: Visiting /docs or /docs/guides renders that index.md file directly as a landing page instead of redirecting.

Per-Page Frontmatter Controls

Every file in content/docs/ is validated by docSchema, which includes SEO fields (robots, sitemap, schemaOrg) plus documentation-specific controls:

---
title: Installation
description: Add Nuxtify to a new or existing Nuxt project.
icon: mdi-download-outline
publishedAt: 2026-03-01T00:00:00Z
updatedAt: 2026-04-10T00:00:00Z
---
FieldTypeDefaultDescription
titlestringRequiredRendered as the <h1> in DocsTitle, sidebar label, breadcrumb leaf, and page <title>.
descriptionstringundefinedSubtitle below DocsTitle, prev/next card snippet, and meta description.
iconstringundefinedOptional MDI icon displayed beside the page link in DocsSidebar.
tocbooleantrueShows or hides the sticky right-hand PageToc (populated from ## and ### headings).
prevNextbooleantrueShows or hides the DocsPrevNext cards at the bottom of the page.
draftbooleanfalseKeeps the page visible in nuxt dev while hiding it in production.
publishedAtstring | DateundefinedOptional publication date (also used for scheduled publishing when set in the future).
updatedAtstring | DateundefinedOptional last-modified timestamp included in Schema.org dateModified.
schemaTypeArticleSchemaType'TechArticle'Overrides the Schema.org @type for this page (Article, BlogPosting, NewsArticle, TechArticle, SocialMediaPosting).

Because DocsTitle renders the page <h1> from title, start your Markdown body headings at ## and avoid skipping heading levels so PageToc builds a clean hierarchy.

Next Steps