字
字节笔记本
2026年2月15日
Docmd - 轻量级 Markdown 文档生成器
API中转
¥120
从 Markdown 生成极简、快速且美观的文档站点。无 React,无臃肿,只有内容。专为开发者打造。
项目简介
Docmd 是一个轻量级文档生成工具,694 stars,生成纯静态 HTML,无需 React 水合,无繁重打包。
"Works out of the box with sensible defaults. Just
initand go."
核心特性
| 特性 | 说明 |
|---|---|
| Zero Config | 开箱即用,合理默认配置 |
| Blazing Fast | 生成纯静态 HTML,无 React 水合延迟,无重包 |
| Smart Search | 内置离线全文搜索,支持模糊匹配,无需 API Key |
| Isomorphic Core | 随处运行:Node.js CLI、CI/CD 流水线、浏览器 |
| Rich Content | 内置 Callouts、Cards、Tabs、Steps、Changelogs、Mermaid 图表 |
| Theming | 支持 light/dark 模式,预置主题:sky、ruby、retro |
技术栈
- 语言: Node.js
- 输出: Static HTML
- JS 包体积: < 15kb
- 许可证: MIT
安装方法
bash
npm install -g @docmd/coreCLI 使用命令
| 命令 | 功能 |
|---|---|
docmd init | 初始化新项目,生成配置和资源 |
docmd dev | 启动本地开发服务器,支持热重载 |
docmd build | 生成生产就绪的静态站点到 ./site |
docmd live | 启动浏览器版 Live Editor |
项目结构
text
my-docs/
├── docs/ # Markdown 文件
│ ├── index.md # 首页
│ └── guide.md # 内容页
├── assets/ # 图片和自定义 CSS
├── docmd.config.js # 配置文件
└── package.json配置说明
配置示例包括 siteTitle、siteUrl、theme、navigation 等选项。
API 使用方式
支持通过 Node.js API 调用 build 和 buildLive 函数。
竞品对比
| 对比项 | docmd | Docusaurus | MkDocs | Mintlify |
|---|---|---|---|---|
| 语言 | Node.js | React.js | Python | Proprietary |
| 输出 | Static HTML | React SPA | Static HTML | Hosted |
| JS 体积 | < 15kb | Heavy | Minimal | Medium |
| 搜索 | Built-in (Offline) | Algolia (Ext) | Built-in | Built-in |
| 搭建时间 | ~1 min | ~15 mins | ~10 mins | Instant |
项目统计
- ⭐ 694 stars
- 🍴 43 forks
- 📝 328 commits
- 📄 MIT 许可证
资源链接
- GitHub 仓库: https://github.com/docmd-io/docmd
- 官网: https://docmd.io
- 文档: https://docs.docmd.io/getting-started/installation/
- Live Editor: https://live.docmd.io
- NPM 包: @docmd/core
分享: