Installation

Create a documentation site from an official template, or add @movk/nuxt-docs as a layer to an existing Nuxt project. This page compares the default, i18n and module templates and lists the runtime requirements and required dependencies.
View source

Requirements

  • Node.js 22.22.3+ (22.x), 24.15.0+ (24.x), or 26+. The content database uses the built-in node:sqlite, so better-sqlite3 is not needed
  • Nuxt 4.6.1+ (4.x), Tailwind CSS 4 and @nuxt/content 3, all peer dependencies installed in your project

Create from a template

All three templates come with extends, a landing page and sample docs already set up:

TemplateBest forIncludes
defaultGeneral documentation sitesLanding page, docs pages, ESLint and type checking
i18nMultilingual sitesdefault plus @nuxtjs/i18n, with Simplified Chinese and English content
modulenpm package or Nuxt module docsdefault plus a releases.yml release notes page

Replace default in the command with the template you need:

pnpm dlx nuxi init -t gh:mhaibaraai/movk-nuxt-docs/templates/default my-docs
cd my-docs
pnpm dev

nuxi init asks whether to install dependencies after creating the project. Then open http://localhost:3000.

The .env.example file in each template lists the available environment variables. Copy it to .env and fill in what you need:

.env
# Reads GitHub commits and releases; required in production
NUXT_GITHUB_TOKEN=
# Enables AI Chat when set
AI_API_KEY=
# Optional: OpenAI-compatible endpoint; leave empty to use AI Gateway
AI_BASE_URL=
The templates do not include the AI Chat dependencies. Install them as described in AI Chat before setting AI_API_KEY, otherwise the build fails with the install command to run.

Add to an existing project

Install dependencies

pnpm add @movk/nuxt-docs @nuxt/content tailwindcss
@nuxt/content must be a dependency of your application. The generated collection types only work when it resolves from the application scope; otherwise server-side queryCollection and friends are inferred as never.

Extend the layer

nuxt.config.ts
export default defineNuxtConfig({
  extends: ['@movk/nuxt-docs']
})

Write your first page

Docs must live in content/docs/, and the route prefix is always /docs:

content/docs/1.getting-started/1.index.md
---
title: Introduction
description: My first documentation page.
---

## Getting started

Write your content in Markdown.

Numeric prefixes in file names only control ordering, so the route above is /docs/getting-started. The landing page is rendered from content/index.md, or from app/pages/index.vue if you prefer a Vue page. See Project Structure for more conventions.

Optional dependencies

Features that are off by default need extra dependencies. If you enable one without them, the build fails and prints the install command:

FeatureDependencies
AI Chatai @ai-sdk/openai @ai-sdk/vue @comark/vue @shikijs/engine-javascript @shikijs/langs @shikijs/themes
Component docsnuxt-component-meta vue-component-meta prettier
Mermaidmermaid dompurify
Accessibility checks@nuxt/a11y
Internationalization@nuxtjs/i18n

See Feature Flags for how to enable each one.

Let an AI assistant help

The Agent Skills published by this site can be installed into AI assistants such as Claude Code or Cursor, so they generate pages that follow the theme's conventions:

Terminal
npx skills add https://docs.mhaibaraai.cn

Your own site publishes its skills/ directory the same way, see Agent Skills.

Copyright © 2024 - 2026