---
title: "nuxt.config Options"
description: "Every nuxt.config option and environment variable the layer reads at build time, including feature flags, AI Chat, component metadata, MCP, llms.txt, agent discovery and site info. Changing these options requires a rebuild or a dev server restart."
canonical_url: "https://docs.mhaibaraai.cn/en/docs/reference/nuxt-config"
---
# nuxt.config Options

> Every nuxt.config option and environment variable the layer reads at build time, including feature flags, AI Chat, component metadata, MCP, llms.txt, agent discovery and site info. Changing these options requires a rebuild or a dev server restart.

This page lists the options Movk Nuxt Docs reads or presets in `nuxt.config.ts`. For runtime UI settings, see the [app.config Reference](https://docs.mhaibaraai.cn/en/docs/reference/app-config).

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  extends: ['@movk/nuxt-docs'],
  site: { name: 'My Docs', url: 'https://docs.example.com' },
  movkNuxtDocs: { componentDocs: true },
  aiChat: { model: 'openai/gpt-5-mini' }
})
```

## `movkNuxtDocs`

Feature flags, see [Feature Flags](https://docs.mhaibaraai.cn/en/docs/guide/features).

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `movkNuxtDocs.componentDocs` | `boolean` | `false` | Component docs: `ComponentProps` / `Slots` / `Emits` / `Code` / `Example`; requires `nuxt-component-meta`, `vue-component-meta` and `prettier` |
| `movkNuxtDocs.mcp` | `boolean` | `true` | Built-in MCP Server; cannot be turned off while AI Chat is enabled |
| `movkNuxtDocs.ogImage` | `boolean` | `true` | OG images generated at build time |
| `movkNuxtDocs.mermaid` | `boolean` | `false` | Mermaid diagrams; requires `mermaid` and `dompurify` |
| `movkNuxtDocs.a11y` | `boolean` | `false` | `@nuxt/a11y` accessibility checks during development; requires `@nuxt/a11y` |

## `aiChat`

Module options of the AI chat assistant. UI text and icons live in `aiChat` in `app.config`, see [AI Chat](https://docs.mhaibaraai.cn/en/docs/ai/ai-chat).

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `aiChat.enabled` | `boolean` | `true` when `AI_API_KEY` exists at build time | Enable AI Chat |
| `aiChat.model` | `string` | `''` | Default model, as `provider/model` or `model` |
| `aiChat.models` | `string[]` | `[]` | Models offered in the model selector |
| `aiChat.apiPath` | `string` | `'/api/ai-chat'` | Chat API endpoint; a handler at the same path in your `server/` directory replaces the built-in one |
| `aiChat.mcpPath` | `string` | `'/mcp'` | MCP Server path AI Chat connects to, also written to the MCP server card |

## `componentMeta`

Options passed to [nuxt-component-meta](https://github.com/nuxt-content/nuxt-component-meta) when `movkNuxtDocs.componentDocs` is on. The layer excludes every component under your `app/components/` and `components/` by default; only components matched by `include` get metadata.

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `componentMeta.include` | `Array<string \| RegExp \| (component) => boolean>` | `[]` | Project components to generate metadata for. Strings match the file path and support `*` (within a directory) and `**`; regular expressions match both the file path and the PascalCase name; functions receive `{ filePath, pascalName }` |
| `componentMeta.exclude` | Same as above | Official Nuxt packages and modules that register components by package name | Extra exclusions, appended after the layer defaults |

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  componentMeta: {
    include: [
      'app/components/ui/**',
      /^Base/,
      ({ pascalName }) => pascalName.endsWith('Input')
    ]
  }
})
```

## `site`

Read by `nuxt-site-config`; affects canonical URLs, the sitemap, OG images, `llms.txt` and the MCP server card.

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `site.url` | `string` | Inferred from the deployment environment | Site URL, read from `NUXT_PUBLIC_SITE_URL`, `NUXT_SITE_URL`, then the deployment URLs of Vercel, Netlify, Cloudflare Pages and GitLab Pages |
| `site.name` | `string` | `name` in `package.json`, then the Git repository name | Site name, also the default of `header.title`, `seo.title` and `llms.title` |

## `mcp`

Options passed to `@nuxtjs/mcp-toolkit` when `movkNuxtDocs.mcp` is on; see that module's docs for options not listed here, and [MCP Server](https://docs.mhaibaraai.cn/en/docs/ai/mcp).

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `mcp.name` | `string` | Decided by `@nuxtjs/mcp-toolkit` | Name of the MCP Server |
| `mcp.browserRedirect` | `string` | Decided by `@nuxtjs/mcp-toolkit` | Page to redirect to when the MCP endpoint is opened in a browser; also the documentation URL of the MCP server card, which uses `/docs` when unset |

## `llms`

Options passed to [nuxt-llms](https://github.com/nuxt-content/nuxt-llms) to generate `/llms.txt` and `/llms-full.txt`, see [LLMs.txt](https://docs.mhaibaraai.cn/en/docs/ai/llms-txt).

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `llms.domain` | `string` | Inferred site URL, or `https://example.com` when it cannot be inferred | Domain used for links in the files |
| `llms.title` | `string` | Site name | Title of `/llms.txt` |
| `llms.description` | `string` | `description` in `package.json` | Description of `/llms.txt` |
| `llms.full.title` | `string` | Site name | Title of `/llms-full.txt` |
| `llms.full.description` | `string` | `description` in `package.json` | Description of `/llms-full.txt` |
| `llms.notes` | `string[]` | — | Notes appended to `/llms.txt` |

## `agentDiscovery`

Options passed to [nuxt-agent-discovery](https://github.com/benjamincanac/nuxt-agent-discovery). The layer presets the values below, see [Agent Discovery](https://docs.mhaibaraai.cn/en/docs/ai/agent-discovery).

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `agentDiscovery.skills.dir` | `string` | `'skills'` | Agent Skills directory, relative to the project root, see [Agent Skills](https://docs.mhaibaraai.cn/en/docs/ai/skills) |
| `agentDiscovery.sitemap.markdown.expand` | `string[]` | `['/docs']` | Paths whose child pages are all listed in `/sitemap.md` |
| `agentDiscovery.sitemap.markdown.labels` | `Record<string, string>` | `{ 'getting-started': 'Getting Started' }` | Replacement titles for sections in `/sitemap.md` |
| `agentDiscovery.siteUrl` / `siteName` | `string` | `site.url` / `site.name` | Site info used in discovery documents |

The MCP server card and discovery links are generated by the layer from the feature flags, `aiChat.mcpPath` and `mcp.browserRedirect`; overriding them by hand is not recommended.

## `i18n`

Add `@nuxtjs/i18n` to `modules` and configure `i18n.locales` to enable multiple languages, see [Internationalization](https://docs.mhaibaraai.cn/en/docs/guide/i18n).

| Option | Type | Description |
| --- | --- | --- |
| `i18n.defaultLocale` | `string` | Default locale, served without a URL prefix; defaults to the first entry of `locales` |
| `i18n.locales` | `Array<{ code: string, name: string }>` | Locales. Locales without a built-in translation file or a `content/{code}/docs` directory are filtered out at build time with a warning; do not declare `file` |

The layer always uses the `prefix_except_default` routing strategy.

## Environment variables

| Variable | Required | Description |
| --- | --- | --- |
| `NUXT_GITHUB_TOKEN` | Recommended in production | GitHub API token for the releases page, commit history and last commit dates, avoiding anonymous rate limits |
| `AI_API_KEY` | When AI Chat is enabled | Master switch for AI Chat; shared by AI Gateway and OpenAI-compatible endpoints |
| `AI_BASE_URL` | No | OpenAI-compatible endpoint such as `https://api.deepseek.com/v1`; AI Gateway is used when empty |
| `NUXT_PUBLIC_SITE_URL` / `NUXT_SITE_URL` | No | Explicit site URL, taking precedence over platform inference |


## Sitemap

See the full [sitemap](https://docs.mhaibaraai.cn/sitemap.md) for all pages.
