docus:基于 Nuxt 生态的文档生成项目

Write beautiful documentations with Nuxt and Markdown.

分支24Tags184
文件最后提交记录最后更新时间
11 个月前
2 个月前
9 天前
7 天前
7 天前
4 个月前
2 个月前
6 个月前
1 年前
1 年前
1 年前
2 个月前
1 年前
2 个月前
1 年前
9 天前
9 天前
1 个月前

docus

使用 Markdown 和 Vue 组件创建精美的文档

npm version npm downloads License

🚀 快速开始

本地开发

只需几秒钟即可创建一个新的文档项目:

# Create a new project
npx create-docus my-docs

# Or create with i18n template for multi-language docs
npx create-docus my-docs -t i18n

# Navigate to your project
cd my-docs

# Start development server
npm run dev

就是这样!您的文档网站将在 http://localhost:3000 运行。

在线开发

首先部署 docus 模板,并直接通过 Vercel 创建您的 git 仓库:

使用 Vercel 部署

🎯 它创建了什么

CLI 会搭建一个完整的文档项目,包含:

  • 美观设计 - 基于 Nuxt UI 4 和 Tailwind CSS 4 构建的简洁现代文档主题
  • 📱 响应式 - 移动优先的响应式设计
  • 🌙 深色模式 - 内置深色/浅色模式,支持 d 快捷键切换
  • 🌍 国际化 - 原生 i18n 支持,助手 UI 提供 20 多种语言
  • 🔍 搜索功能 - 客户端搜索,可选 FTS5 全文搜索后端
  • 📝 增强型 Markdown - 扩展 Markdown,支持自定义 MDC 组件
  • 🎨 可定制 - 主题变体、自定义图标、
  • 极速性能 - 基于 Nuxt 4 优化性能
  • 🔧 TypeScript - 全面 TypeScript 支持
  • 🤖 AI 助手 - 嵌入式聊天功能,可回答文档问题、引用来源并生成代码
  • 🔌 原生 MCP 服务器 - 内置模型上下文协议服务器,用于 AI 工具集成(Cursor、VS Code、Claude 等)
  • 📚 智能体技能发现 - 通过 .well-known/skills/ 从您的文档网站发布技能
  • 📄 LLM 就绪 - 自动生成 llms.txtllms-full.txt
  • 🗺️ SEO 优化 - 开箱即用地生成站点地图、robots.txt 和 OG 图像

Docus 文档 了解更多信息。

🤖 AI 功能

Docus 内置完整的 AI 工具栈,为您的用户和贡献者提供助力:

助手

在文档中嵌入 AI 驱动的聊天功能,可回答问题、引用来源并生成代码示例。由 Vercel AI Gateway 和您自己的 MCP 服务器提供支持。请参阅 助手指南

MCP 服务器

每个 Docus 站点都会在 /mcp 路径下公开一个 MCP 服务器 — 直接将其安装到您的编辑器中,即可通过任何 AI 工具查询您的文档:

在 Cursor 中安装 MCP 在 VS Code 中安装 MCP

智能体技能

将技能文件放入 skills/ 目录,Docus 会按照 Cloudflare 智能体技能发现 RFC 规范在 /.well-known/skills/ 路径下提供这些技能。用户只需一条命令即可完成安装:

npx skills add https://your-docs-domain.com

获取 Docus 技能本身,以便在构建文档时增强您的 AI 助手功能:

npx skills add nuxt-content/docus

📁 项目结构

生成的项目

my-docs/
├── content/              # Your markdown content
│   ├── index.md         # Homepage
│   └── docs/            # Documentation pages
├── public/              # Static assets
└── package.json         # Dependencies and scripts

可选文件和文件夹

Docus 采用分层系统,您可以进一步使用经典 Nuxt 项目的任何功能或文件:

my-docs/
├── app.config.ts        # App configuration
├── nuxt.config.ts       # Nuxt configuration (add extra modules, components, etc.)
├── app/                 # App directory
│   ├── components/      # Components (add your own components)
│   ├── layouts/         # Layouts (add your own layouts)
│   └── pages/           # Pages (add your own pages)
└── server/              # Server-side code (add your own server-side code)

/content 文件夹结构

单语言结构:

content/
├── index.md
├── getting-started.md
└── guide/
    ├── introduction.md
    └── configuration.md

多语言结构(支持 i18n):

content/
├── en/
│   ├── index.md
│   └── guide/
│       └── introduction.md
└── fr/
    ├── index.md
    └── guide/
        └── introduction.md

⚡ 技术架构

您的项目已预先配置 Nuxt 生态系统的精选工具:

📖 文档指南

有关自定义 Docus 项目的详细文档,请访问 Docus 官方文档

🛠️ 开发说明

本仓库包含 CLI 工具的源代码。

本地开发

如需参与 CLI 工具的开发:

# Clone this repository
git clone https://github.com/nuxt-content/docus

# Install dependencies
pnpm install

# Run the dev server to run the docus docs
pnpm run dev

包结构

这是一个包含以下内容的单体仓库:

📄 许可证

根据 MIT 许可证发布。


Docus 已完全从头重写,其灵感来源于 @pi0 开发的 undocs 💚

项目介绍

撰写优雅的文档,借助 Nuxt 与 Markdown。【此简介由AI生成】

定制我的领域
103.03 K284访问 GitHub