GitHub 37
Skip to content
ViteHub is still experimental. Expect bugs and breaking changes.

Docs site

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

Deploys on
  • Node
  • Cloudflare
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' },
  },
})
nuxt.config.ts

@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 of each page for coding agents. vitehub.dev uses it.

Markdown in, site out

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

Inside your Nuxt app

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

Three layouts

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

Navigation and outline per page

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

Replace any part

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

Pages for coding agents

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

Edit pages in the Console

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

Comments on every page

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

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

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.

The Server API lists every module option, frontmatter field, export, and route. Limits and errors lists what the module does not do yet and how to fix each error.

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

npm
npm install @vite-hub/docs
pnpm
pnpm add @vite-hub/docs
yarn
yarn add @vite-hub/docs
bun
bun add @vite-hub/docs
export default defineNuxtConfig({
  modules: ['@vite-hub/docs/nuxt'],
  docs: { site: { name: 'Lumen' } },
})
nuxt.config.ts

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 and no assistant.