# Docs site

Write Markdown files. Get a documentation site that people and coding agents can read.

Hosts: Node, Cloudflare.

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  modules: ['vite-hub/docs/nuxt'],
  docs: {
    // Name in titles, the rail, and llms.txt
    site: { name: 'Lumen', url: 'https://lumen.example.com' },
  },
})
```

````md [content/docs/guide/install.md]
---
title: Install Lumen
description: Install the lumen binary with pnpm.
---

Install the binary globally:

```sh
pnpm add -g lumen-cli
```
````

```yaml [content/docs/guide/.navigation.yml]
title: Guide
icon: i-lucide-book-open
```

`@vite-hub/docs` is a Nuxt module. Each folder in `content/docs/` is a section, and each Markdown file in it is a page. The module adds a shell, search, and a Markdown copy for coding agents. [vitehub.dev](https://vitehub.dev) uses it.

### [Markdown in, site out](https://vitehub.dev/docs/docs-site/get-started)

Folders are sections and files are pages. Frontmatter sets the title, the layout, and the order.

### [Inside your Nuxt app](https://vitehub.dev/docs/docs-site/nuxt-app)

Pages in `content/docs/` are at `/docs`. The app keeps its own pages, its `app.vue`, and its theme.

### [Three layouts](https://vitehub.dev/docs/docs-site/configure#layouts)

`article` for guides, `tutorial` for numbered steps with a code panel, and `landing` for Overviews.

### [Navigation and outline per page](https://vitehub.dev/docs/docs-site/configure#navigation-and-outline)

Left navigation and right outline show by default. One frontmatter field hides each.

### [Replace any part](https://vitehub.dev/docs/docs-site/configure#replace-a-component)

Add a component with the same name, such as `DocsPageHeaderLinks`, and the shell uses yours.

### [Pages for coding agents](https://vitehub.dev/docs/docs-site/configure#agent-resources)

Each page has a Markdown copy at `/raw`. llms.txt, a sitemap, and an MCP server need no setup.

### [Edit pages in the Console](https://vitehub.dev/docs/docs-site/configure#edit-in-the-console)

The CMS edits, previews, and publishes pages. Each publish opens a pull request.

### [Comments on every page](https://vitehub.dev/docs/docs-site/configure#comments)

With `vite-hub/nuxt`, your team pins comments on a page and replies. `comments: false` turns them off.

### [A docs assistant on your ChatGPT plan](https://vitehub.dev/docs/docs-site/assistant)

A ViteHub Agent answers questions from your pages and links them. No API key.

## Defaults first

The design follows the comark-ui site: Geist, neutral grays, small radii, hairline rings, and a faint grain. Every option has a default, so a site name is enough to start. To change a default, edit one option in `nuxt.config.ts`, one frontmatter field, or one component. See [Configure](https://vitehub.dev/docs/docs-site/configure).

## Reference and limits

The [Server API](https://vitehub.dev/docs/docs-site/server-api) lists every module option, frontmatter field, export, and route. [Limits and errors](https://vitehub.dev/docs/docs-site/limits-and-errors) lists what the module does not do yet and how to fix each error.

## Use without ViteHub

The module also works in a Nuxt app without `vite-hub`. Install `@vite-hub/docs` and add `@vite-hub/docs/nuxt` to `modules`:

```bash pm [commands/install-alone]
pnpm add @vite-hub/docs
```

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  modules: ['@vite-hub/docs/nuxt'],
  docs: { site: { name: 'Lumen' } },
})
```

Import the other paths from `@vite-hub/docs` too, such as `createDocsManifest()` from `@vite-hub/docs/server`. Without `vite-hub/nuxt`, the site has no [Comments](https://vitehub.dev/docs/docs-site/configure#comments) and no [assistant](https://vitehub.dev/docs/docs-site/assistant).

<!-- vitehub-docs:section-links -->
## In this section

- [Overview](https://vitehub.dev/raw/docs/docs-site.md) (this page)
- [Get started](https://vitehub.dev/raw/docs/docs-site/get-started.md)
- [Add to a Nuxt app](https://vitehub.dev/raw/docs/docs-site/nuxt-app.md)
- [Configure](https://vitehub.dev/raw/docs/docs-site/configure.md)
- [Docs assistant](https://vitehub.dev/raw/docs/docs-site/assistant.md)
- [Server API](https://vitehub.dev/raw/docs/docs-site/server-api.md)
- [Limits and errors](https://vitehub.dev/raw/docs/docs-site/limits-and-errors.md)

Next: [Get started](https://vitehub.dev/raw/docs/docs-site/get-started.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
