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,
},
},
},
},
})
Like other CMS collections, docs works out of the box with its defaults. If you override enabled or routePrefix (for example, serving docs at /guide instead of /docs), place that override in nuxt.config.ts so routes and sitemap exclusions register at build time.
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):
DocsTabsstays hidden and all pages render directly inDocsSidebar. - Top-level folders (
1.getting-started/,2.guides/,3.reference/): Become horizontal category tabs inDocsTabs. - Nested subfolders (
1.customization/,2.content/): Become collapsible sidebar groups insideDocsSidebarfor 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/docsor a folder URL like/docs/guidesautomatically redirects (302) to the first navigable leaf document in that subtree (for example,/docs/getting-started/introduction). - Include
index.md: Visiting/docsor/docs/guidesrenders thatindex.mdfile directly as a landing page instead of redirecting.
When prerendering a static site without a content/docs/index.md file, Nitro's crawlLinks crawler may not follow the /docs redirect automatically. Add your first doc page (e.g., '/docs/getting-started/introduction') to nitro.prerender.routes in nuxt.config.ts so every linked docs route gets discovered and prerendered. See Rendering & Deployment for details.
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
---
| Field | Type | Default | Description |
|---|---|---|---|
title | string | Required | Rendered as the <h1> in DocsTitle, sidebar label, breadcrumb leaf, and page <title>. |
description | string | undefined | Subtitle below DocsTitle, prev/next card snippet, and meta description. |
icon | string | undefined | Optional MDI icon displayed beside the page link in DocsSidebar. |
toc | boolean | true | Shows or hides the sticky right-hand PageToc (populated from ## and ### headings). |
prevNext | boolean | true | Shows or hides the DocsPrevNext cards at the bottom of the page. |
draft | boolean | false | Keeps the page visible in nuxt dev while hiding it in production. |
publishedAt | string | Date | undefined | Optional publication date (also used for scheduled publishing when set in the future). |
updatedAt | string | Date | undefined | Optional last-modified timestamp included in Schema.org dateModified. |
schemaType | ArticleSchemaType | '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
- Learn how drafts and future
publishedAtdates behave in Drafts & Scheduled Publishing. - Review all
content.docsoptions in CMS Options. - Inspect every prop for
DocsTabs,DocsSidebar,DocsMobileBar,DocsTitle, andDocsPrevNextin Docs Components.