create-docs by nuxt-content/docus
npx skills add https://github.com/nuxt-content/docus --skill create-docs为任何项目生成完整、可用于生产环境的文档站点。
根据锁文件检测,如果未找到则默认使用 npm:
| 锁文件 | 包管理器 | 安装 | 运行 | 添加 |
|---|---|---|---|---|
pnpm-lock.yaml | pnpm | pnpm install | pnpm run |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
pnpm add |
package-lock.json | npm | npm install | npm run | npm install |
yarn.lock | yarn | yarn install | yarn | yarn add |
bun.lockb | bun | bun install | bun run | bun add |
在下面的命令中使用 [pm] 作为占位符。
Check for:
├── pnpm-workspace.yaml → pnpm monorepo
├── turbo.json → Turborepo monorepo
├── lerna.json → Lerna monorepo
├── nx.json → Nx monorepo
├── apps/ → Apps 目录 (monorepo)
├── packages/ → Packages 目录 (monorepo)
├── docs/ → 现有 docs 目录 (避免覆盖)
├── README.md → 主要文档来源
└── src/ 或 lib/ → 源代码位置
| 项目类型 | 目标目录 | 工作空间入口 |
|---|---|---|
| 标准项目 | ./docs | N/A |
带有 apps/ 的 Monorepo | ./apps/docs | apps/docs |
带有 packages/ 的 Monorepo | ./docs | docs |
已存在 docs/ 文件夹 | 询问用户或使用 ./documentation | — |
| 文件 | 提取内容 |
|---|---|
README.md | 项目名称、描述、功能、使用示例 |
package.json | 名称、描述、依赖项、仓库 URL |
src/ 或 lib/ | 用于 API 文档的导出函数、组合式函数 |
检查项目是否需要多语言文档:
| 指标 | 操作 |
|---|---|
依赖项中包含 @nuxtjs/i18n | 使用 i18n 模板 |
存在 locales/ 或 i18n/ 文件夹 | 使用 i18n 模板 |
| 存在多个语言的 README 文件 | 使用 i18n 模板 |
| 用户明确提及多种语言 | 使用 i18n 模板 |
| 以上均不符合 | 使用默认模板 |
默认模板:
[docs-location]/
├── app/ # 可选:用于自定义
│ ├── app.config.ts
│ ├── components/
│ ├── layouts/
│ └── pages/
├── content/
│ ├── index.md
│ └── 1.getting-started/
│ ├── .navigation.yml
│ └── 1.introduction.md
├── public/
│ └── favicon.ico
├── package.json
└── .gitignore
i18n 模板(如果检测到多语言):
[docs-location]/
├── app/
│ └── app.config.ts
├── content/
│ ├── en/
│ │ ├── index.md
│ │ └── 1.getting-started/
│ │ ├── .navigation.yml
│ │ └── 1.introduction.md
│ └── fr/ # 或其他检测到的语言
│ ├── index.md
│ └── 1.getting-started/
│ ├── .navigation.yml
│ └── 1.introduction.md
├── nuxt.config.ts # i18n 配置必需
├── public/
│ └── favicon.ico
├── package.json
└── .gitignore
默认:
{
"name": "[project-name]-docs",
"private": true,
"scripts": {
"dev": "nuxt dev --extends docus",
"build": "nuxt build --extends docus",
"generate": "nuxt generate --extends docus",
"preview": "nuxt preview --extends docus"
},
"dependencies": {
"docus": "latest",
"better-sqlite3": "^12.5.0",
"nuxt": "^4.2.2"
}
}
i18n(添加 @nuxtjs/i18n):
{
"name": "[project-name]-docs",
"private": true,
"scripts": {
"dev": "nuxt dev --extends docus",
"build": "nuxt build --extends docus",
"generate": "nuxt generate --extends docus",
"preview": "nuxt preview --extends docus"
},
"dependencies": {
"@nuxtjs/i18n": "^10.2.1",
"docus": "latest",
"better-sqlite3": "^12.5.0",
"nuxt": "^4.2.2"
}
}
export default defineNuxtConfig({
modules: ['@nuxtjs/i18n'],
i18n: {
locales: [
{ code: 'en', language: 'en-US', name: 'English' },
{ code: 'fr', language: 'fr-FR', name: 'Français' }
],
defaultLocale: 'en'
}
})
node_modules
.nuxt
.output
.data
dist
onlyBuiltDependencies(better-sqlite3 必需):packages:
- 'apps/*'
- 'docs'
onlyBuiltDependencies:
- better-sqlite3
2. 在根 package.json 中添加开发脚本:
{
"scripts": {
"docs:dev": "pnpm run --filter [docs-package-name] dev"
}
}
或者使用目录路径:
{
"scripts": {
"docs:dev": "cd docs && pnpm dev"
}
}
{
"workspaces": ["apps/*", "docs"],
"scripts": {
"docs:dev": "npm run dev --workspace=docs"
}
}
使用 references/templates.md 中的模板。
关键:MDC 组件命名
MDC 中的所有 Nuxt UI 组件必须使用 u- 前缀:
| 正确 | 错误 |
|---|---|
::u-page-hero | ::page-hero |
::u-page-section | ::page-section |
:::u-page-feature | :::page-feature |
:::u-button | :::button |
::::u-page-card | ::::page-card |
没有 u- 前缀,Vue 将无法解析这些组件。
content/
├── index.md # 首页
├── 1.getting-started/
│ ├── .navigation.yml
│ ├── 1.introduction.md
│ └── 2.installation.md
├── 2.guide/
│ ├── .navigation.yml
│ ├── 1.configuration.md
│ ├── 2.authentication.md
│ └── 3.deployment.md
└── 3.api/ # 如果适用
├── .navigation.yml
└── 1.reference.md
index.md) - 英雄区域 + 功能网格关于写作风格,请参阅 references/writing-guide.md。关于 MDC 组件,请参阅 references/mdc-components.md。
Docus 自动包含 MCP 服务器 (/mcp) 和 llms.txt 生成。无需配置。
请勿在首页添加 AI 集成部分。 这些功能会自动生效。
可选择在介绍页面提及:
::note
此文档包含 AI 集成,带有 MCP 服务器和自动 `llms.txt` 生成。
::
export default defineAppConfig({
docus: {
name: '[项目名称]',
description: '[项目描述]',
url: 'https://[docs-url]',
socials: {
github: '[组织]/[仓库]'
}
}
})
如果项目有设计系统或品牌颜色,可以自定义文档主题。
创建 app/assets/css/main.css:
@import "tailwindcss";
@import "@nuxt/ui";
@theme {
/* 自定义字体 */
--font-sans: 'Inter', sans-serif;
/* 自定义容器宽度 */
--ui-container: 90rem;
/* 自定义主色调(使用项目品牌颜色) */
--color-primary-50: oklch(0.97 0.02 250);
--color-primary-500: oklch(0.55 0.2 250);
--color-primary-900: oklch(0.25 0.1 250);
}
export default defineAppConfig({
docus: {
name: '[项目名称]',
description: '[项目描述]',
url: 'https://[docs-url]',
socials: {
github: '[组织]/[仓库]',
x: '@[句柄]'
}
},
// 自定义 UI 组件
ui: {
colors: {
primary: 'emerald',
neutral: 'zinc',
},
pageHero: {
slots: {
title: 'font-semibold sm:text-6xl'
}
}
}
})
使用检测到的包管理器提供说明。
文档已创建于 [docs-location]
启动方法:
cd [docs-location]
[pm] install
[pm] run dev
访问地址:http://localhost:3000
文档已创建于 [docs-location]
从根目录启动:
[pm] install
[pm] run docs:dev
或从 docs 目录启动:
cd [docs-location]
[pm] run dev
访问地址:http://localhost:3000
content/2.guide/ 中添加更多指南app.config.ts 中自定义主题文档创建完成后,建议进行增强:
您的文档已准备就绪!
您希望我:
- **自定义 UI** - 匹配您的品牌颜色和样式
- **增强首页** - 添加功能卡片、代码预览、视觉效果
- **添加 i18n 支持** - 多语言文档
- **设置部署** - 部署到 Vercel、Netlify 或 Cloudflare
请告诉我您想改进什么!
| 平台 | 命令 | 输出 |
|---|---|---|
| Vercel | npx vercel --prod | 自动检测 |
| Netlify | [pm] run generate | .output/public |
| Cloudflare Pages | [pm] run generate | .output/public |
| GitHub Pages | [pm] run generate | .output/public |
检测到: pnpm monorepo,包在 packages/ 中
生成的结构:
docs/
├── content/
│ ├── index.md
│ ├── 1.getting-started/
│ │ ├── .navigation.yml
│ │ ├── 1.introduction.md
│ │ └── 2.installation.md
│ ├── 2.guide/
│ │ ├── .navigation.yml
│ │ ├── 1.authentication.md
│ │ ├── 2.oauth-providers.md
│ │ └── 3.sessions.md
│ └── 3.api/
│ ├── .navigation.yml
│ └── 1.composables.md
├── public/
│ └── favicon.ico
├── package.json
└── .gitignore
authentication.md 内部(基于操作的 H2 标题):
## 添加基本身份验证
## 保护您的路由
## 处理登录重定向
## 自定义会话
每周安装量
271
仓库
GitHub 星标
2.7K
首次出现
Jan 27, 2026
安全审计
安装于
opencode230
github-copilot228
gemini-cli224
codex223
amp195
kimi-cli195
Generate a complete, production-ready documentation site for any project.
Detect from lock files, default to npm if none found:
| Lock File | PM | Install | Run | Add |
|---|---|---|---|---|
pnpm-lock.yaml | pnpm | pnpm install | pnpm run | pnpm add |
package-lock.json | npm | npm install | npm run | npm install |
yarn.lock | yarn | yarn install | yarn | yarn add |
bun.lockb | bun | bun install | bun run | bun add |
Use [pm] as placeholder in commands below.
Check for:
├── pnpm-workspace.yaml → pnpm monorepo
├── turbo.json → Turborepo monorepo
├── lerna.json → Lerna monorepo
├── nx.json → Nx monorepo
├── apps/ → Apps directory (monorepo)
├── packages/ → Packages directory (monorepo)
├── docs/ → Existing docs (avoid overwriting)
├── README.md → Main documentation source
└── src/ or lib/ → Source code location
| Project Type | Target Directory | Workspace Entry |
|---|---|---|
| Standard project | ./docs | N/A |
Monorepo with apps/ | ./apps/docs | apps/docs |
Monorepo with packages/ | ./docs | docs |
| File | Extract |
|---|---|
README.md | Project name, description, features, usage examples |
package.json | Name, description, dependencies, repository URL |
src/ or lib/ | Exported functions, composables for API docs |
Check if project needs multi-language docs:
| Indicator | Action |
|---|---|
@nuxtjs/i18n in dependencies | Use i18n template |
locales/ or i18n/ folder exists | Use i18n template |
| Multiple language README files | Use i18n template |
| User explicitly mentions multiple languages | Use i18n template |
| None of the above | Use default template |
Default template:
[docs-location]/
├── app/ # Optional: for customization
│ ├── app.config.ts
│ ├── components/
│ ├── layouts/
│ └── pages/
├── content/
│ ├── index.md
│ └── 1.getting-started/
│ ├── .navigation.yml
│ └── 1.introduction.md
├── public/
│ └── favicon.ico
├── package.json
└── .gitignore
i18n template (if multi-language detected):
[docs-location]/
├── app/
│ └── app.config.ts
├── content/
│ ├── en/
│ │ ├── index.md
│ │ └── 1.getting-started/
│ │ ├── .navigation.yml
│ │ └── 1.introduction.md
│ └── fr/ # Or other detected languages
│ ├── index.md
│ └── 1.getting-started/
│ ├── .navigation.yml
│ └── 1.introduction.md
├── nuxt.config.ts # Required for i18n config
├── public/
│ └── favicon.ico
├── package.json
└── .gitignore
Default:
{
"name": "[project-name]-docs",
"private": true,
"scripts": {
"dev": "nuxt dev --extends docus",
"build": "nuxt build --extends docus",
"generate": "nuxt generate --extends docus",
"preview": "nuxt preview --extends docus"
},
"dependencies": {
"docus": "latest",
"better-sqlite3": "^12.5.0",
"nuxt": "^4.2.2"
}
}
i18n (add @nuxtjs/i18n):
{
"name": "[project-name]-docs",
"private": true,
"scripts": {
"dev": "nuxt dev --extends docus",
"build": "nuxt build --extends docus",
"generate": "nuxt generate --extends docus",
"preview": "nuxt preview --extends docus"
},
"dependencies": {
"@nuxtjs/i18n": "^10.2.1",
"docus": "latest",
"better-sqlite3": "^12.5.0",
"nuxt": "^4.2.2"
}
}
export default defineNuxtConfig({
modules: ['@nuxtjs/i18n'],
i18n: {
locales: [
{ code: 'en', language: 'en-US', name: 'English' },
{ code: 'fr', language: 'fr-FR', name: 'Français' }
],
defaultLocale: 'en'
}
})
node_modules
.nuxt
.output
.data
dist
onlyBuiltDependencies (required for better-sqlite3):packages:
- 'apps/*'
- 'docs'
onlyBuiltDependencies:
- better-sqlite3
2. Add dev script to root package.json:
{
"scripts": {
"docs:dev": "pnpm run --filter [docs-package-name] dev"
}
}
Or with directory path:
{
"scripts": {
"docs:dev": "cd docs && pnpm dev"
}
}
{
"workspaces": ["apps/*", "docs"],
"scripts": {
"docs:dev": "npm run dev --workspace=docs"
}
}
Use templates from references/templates.md.
CRITICAL: MDC Component Naming
All Nuxt UI components in MDC must use the u- prefix:
| Correct | Wrong |
|---|---|
::u-page-hero | ::page-hero |
::u-page-section | ::page-section |
:::u-page-feature | :::page-feature |
:::u-button | :::button |
Without the u- prefix, Vue will fail to resolve the components.
content/
├── index.md # Landing page
├── 1.getting-started/
│ ├── .navigation.yml
│ ├── 1.introduction.md
│ └── 2.installation.md
├── 2.guide/
│ ├── .navigation.yml
│ ├── 1.configuration.md
│ ├── 2.authentication.md
│ └── 3.deployment.md
└── 3.api/ # If applicable
├── .navigation.yml
└── 1.reference.md
index.md) - Hero + features gridFor writing style, see references/writing-guide.md. For MDC components, see references/mdc-components.md.
Docus automatically includes MCP server (/mcp) and llms.txt generation. No configuration needed.
Do NOT add AI Integration sections to the landing page. These features work automatically.
Optionally mention in the introduction page:
::note
This documentation includes AI integration with MCP server and automatic `llms.txt` generation.
::
export default defineAppConfig({
docus: {
name: '[Project Name]',
description: '[Project description]',
url: 'https://[docs-url]',
socials: {
github: '[org]/[repo]'
}
}
})
If the project has a design system or brand colors, customize the docs theme.
Create app/assets/css/main.css:
@import "tailwindcss";
@import "@nuxt/ui";
@theme {
/* Custom font */
--font-sans: 'Inter', sans-serif;
/* Custom container width */
--ui-container: 90rem;
/* Custom primary color (use project brand color) */
--color-primary-50: oklch(0.97 0.02 250);
--color-primary-500: oklch(0.55 0.2 250);
--color-primary-900: oklch(0.25 0.1 250);
}
export default defineAppConfig({
docus: {
name: '[Project Name]',
description: '[Project description]',
url: 'https://[docs-url]',
socials: {
github: '[org]/[repo]',
x: '@[handle]'
}
},
// Customize UI components
ui: {
colors: {
primary: 'emerald',
neutral: 'zinc',
},
pageHero: {
slots: {
title: 'font-semibold sm:text-6xl'
}
}
}
})
Provide instructions using detected package manager.
Documentation created in [docs-location]
To start:
cd [docs-location]
[pm] install
[pm] run dev
Available at http://localhost:3000
Documentation created in [docs-location]
To start from root:
[pm] install
[pm] run docs:dev
Or from docs directory:
cd [docs-location]
[pm] run dev
Available at http://localhost:3000
content/2.guide/app.config.tsAfter documentation is created, suggest enhancements:
Your documentation is ready!
Would you like me to:
- **Customize the UI** - Match your brand colors and style
- **Enhance the landing page** - Add feature cards, code previews, visuals
- **Add i18n support** - Multi-language documentation
- **Set up deployment** - Deploy to Vercel, Netlify, or Cloudflare
Let me know what you'd like to improve!
| Platform | Command | Output |
|---|---|---|
| Vercel | npx vercel --prod | Auto-detected |
| Netlify | [pm] run generate | .output/public |
| Cloudflare Pages | [pm] run generate | .output/public |
| GitHub Pages | [pm] run generate |
Detected: pnpm monorepo, package in packages/
Generated structure:
docs/
├── content/
│ ├── index.md
│ ├── 1.getting-started/
│ │ ├── .navigation.yml
│ │ ├── 1.introduction.md
│ │ └── 2.installation.md
│ ├── 2.guide/
│ │ ├── .navigation.yml
│ │ ├── 1.authentication.md
│ │ ├── 2.oauth-providers.md
│ │ └── 3.sessions.md
│ └── 3.api/
│ ├── .navigation.yml
│ └── 1.composables.md
├── public/
│ └── favicon.ico
├── package.json
└── .gitignore
Insideauthentication.md (action-based H2 headings):
## Add basic authentication
## Protect your routes
## Handle login redirects
## Customize the session
Weekly Installs
271
Repository
GitHub Stars
2.7K
First Seen
Jan 27, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode230
github-copilot228
gemini-cli224
codex223
amp195
kimi-cli195
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
140,500 周安装
Spring Boot Actuator 生产可观测性指南:健康检查、指标监控与安全配置
381 周安装
Agent Manager Skill:并行管理多个本地CLI代理,支持任务分配与监控
395 周安装
网站克隆工具:使用Firecrawl和Next.js 16将任何网站转换为生产级代码
425 周安装
Spring Data Neo4j 集成指南:在 Spring Boot 中配置、映射与测试图数据库
380 周安装
LangChain4j 工具与函数调用模式:Java AI 代理集成外部 API 与服务的完整指南
382 周安装
响应式图片最佳实践指南:优化LCP与Web性能的核心Web指标
358 周安装
Existing docs/ folder |
Ask user or ./documentation |
| — |
::::u-page-card | ::::page-card |
.output/public