关于 mkdocs
这项技能介绍如何使用 MkDocs 和 Material for MkDocs 创建及维护基于 Markdown 的文档网站,适合需要可搜索文档、版本管理和部署指引的项目团队。
主要功能
- 01MkDocs 与 Material 配置指引
- 02文档结构规划指引
- 03使用 mike 管理多版本文档
- 04GitHub Pages 部署工作流
- 05Mermaid 图表与插件配置
适用场景
- 01为 Python 项目搭建文档站点
- 02发布带版本管理的项目文档
- 03添加图表和格式化代码示例
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ vamseeachanta/ workspace-hub --skill mkdocs安装后在 Claude Code 中输入/mkdocs确认已加载。
详细介绍
Mkdocs
何时使用此技能
适用场景
- 为开源项目或内部项目编写文档
- 需要快速、可搜索的静态文档网站
- 希望无需自定义 CSS 即可使用美观的 Material Design
- 需要多版本文档(v1.x、v2.x 等)
- 将文档部署到 GitHub Pages、GitLab Pages 或 Netlify
- 使用需要与代码一同提供文档的 Python 项目
- 需要提示框、代码选项卡和内容格式设置
- 希望采用简单的基于 Markdown 的文档工作流
- 需要支持离线使用的文档
- 在编写指南的同时构建 API 文档
不适用场景
- 需要在文档中使用复杂的 React 组件(请使用 Docusaurus)
- 需要自动生成 Python API 文档(请使用 Sphinx)
- 构建单页文档(请使用简单的 HTML)
- 需要转换文档格式(请使用 Pandoc)
- 需要实时协作编辑(请使用 GitBook)
- 制作幻灯片演示文稿(请使用 Marp)
先决条件
安装
# Using pip
pip install mkdocs mkdocs-material
# Using uv (recommended)
uv pip install mkdocs mkdocs-material
# With common plugins
pip install mkdocs mkdocs-material \
mkdocs-minify-plugin \
*See sub-skills for full details.*
### System Requirements
- Python 3.8 or higher
- pip or uv package manager
- Git (for git-revision plugin and mike)
- Node.js (optional, for social cards)
## Prerequisites
- Prerequisite 1
- Prerequisite 2
## Version History
### v1.0.0 (2026-01-17)
- Initial skill creation
- Material for MkDocs theme configuration
- Plugin ecosystem documentation
- GitHub Pages deployment workflows
- Versioning with mike
- Mermaid diagrams integration
- Custom CSS/JS extensions
- Best practices and troubleshooting
## Sub-Skills
- [1. Project Initialization (+1)](1-project-initialization/SKILL.md)
- [3. Navigation Structure (+2)](3-navigation-structure/SKILL.md)
- [Integration with Python Package (+2)](integration-with-python-package/SKILL.md)
- [1. Documentation Structure (+1)](1-documentation-structure/SKILL.md)
- [Examples](examples/SKILL.md)
- [Common Issues (+1)](common-issues/SKILL.md)
## Sub-Skills
- [Note](note/SKILL.md)
- [Tip](tip/SKILL.md)
- [Warning](warning/SKILL.md)
- [Danger](danger/SKILL.md)
- [Example](example/SKILL.md)
- [Info](info/SKILL.md)
- [Success](success/SKILL.md)
- [Question](question/SKILL.md)
- [Quote](quote/SKILL.md)
- [Collapsible Admonitions](collapsible-admonitions/SKILL.md)
- [6. Code Blocks with Features](6-code-blocks-with-features/SKILL.md)
- [Basic Code Block](basic-code-block/SKILL.md)
- [With Title](with-title/SKILL.md)
- [Line Numbers](line-numbers/SKILL.md)
- [Line Highlighting](line-highlighting/SKILL.md)
- [Line Number Start](line-number-start/SKILL.md)
- [Code Annotations](code-annotations/SKILL.md)
- [Tabbed Code Blocks](tabbed-code-blocks/SKILL.md)
- [7. Mermaid Diagrams](7-mermaid-diagrams/SKILL.md)
- [Flowchart](flowchart/SKILL.md)
- [Sequence Diagram](sequence-diagram/SKILL.md)
- [Class Diagram](class-diagram/SKILL.md)
- [State Diagram](state-diagram/SKILL.md)
- [Entity Relationship](entity-relationship/SKILL.md)
- [8. Plugin Configuration (+4)](8-plugin-configuration/SKILL.md)
- [Subsection 1.1](subsection-11/SKILL.md)
- [Section 2](section-2/SKILL.md)
- [3. Abbreviations (+2)](3-abbreviations/SKILL.md)
- [Related Resources](related-resources/SKILL.md)
评论
支持 Markdown