重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
mkdocs by julianobarbosa/claude-code-skills
npx skills add https://github.com/julianobarbosa/claude-code-skills --skill mkdocsMkDocs 是一个快速、简单的静态站点生成器,用于从 Markdown 文件构建项目文档。配置使用单个 YAML 文件 (mkdocs.yml)。
# Install MkDocs
pip install mkdocs
# Verify installation
mkdocs --version
# Create project structure
mkdocs new my-project
cd my-project
# Start development server
mkdocs serve
创建的项目结构:
my-project/
├── mkdocs.yml # Configuration file
└── docs/
└── index.md # Homepage
# mkdocs.yml
site_name: My Project
site_url: https://example.com/
nav:
- Home: index.md
- About: about.md
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 命令 | 用途 |
|---|
mkdocs new PROJECT | 创建新项目 |
mkdocs serve | 启动开发服务器 (localhost:8000) |
mkdocs build | 构建静态站点到 site/ |
mkdocs gh-deploy | 部署到 GitHub Pages |
mkdocs get-deps | 显示所需包 |
常用选项:
-f, --config-file FILE - 使用自定义配置文件-s, --strict - 警告时失败-d, --site-dir DIR - 自定义输出目录--dirty - 仅重建更改的文件--clean - 构建前清理输出project/
├── mkdocs.yml # Configuration (required)
├── docs/
│ ├── index.md # Homepage
│ ├── about.md # Additional pages
│ ├── user-guide/
│ │ ├── index.md # Section homepage
│ │ ├── getting-started.md
│ │ └── configuration.md
│ ├── img/ # Images
│ │ └── logo.png
│ └── css/ # Custom CSS
│ └── extra.css
└── custom_theme/ # Theme customizations (optional)
└── main.html
# Automatic navigation (alphabetically sorted)
# Omit nav key to auto-generate
# Explicit navigation with sections
nav:
- Home: index.md
- User Guide:
- Getting Started: user-guide/getting-started.md
- Configuration: user-guide/configuration.md
- API Reference: api/
- External Link: https://example.com/
# Link to another page
[See Configuration](configuration.md)
# Link to page in another directory
[Installation](../getting-started/installation.md)
# Link to section anchor
[See Options](configuration.md#options)
---
title: Custom Page Title
description: Page description for SEO
authors:
- John Doe
date: 2024-01-01
---
# Page Content Here
```python
def hello():
print("Hello, World!")
```
| Header 1 | Header 2 |
| -------- | -------- |
| Cell 1 | Cell 2 |
# Default MkDocs theme
theme:
name: mkdocs
color_mode: auto # light, dark, auto
user_color_mode_toggle: true
nav_style: primary # primary, dark, light
highlightjs: true
navigation_depth: 2
locale: en
# ReadTheDocs theme
theme:
name: readthedocs
prev_next_buttons_location: bottom
navigation_depth: 4
collapse_navigation: true
pip install mkdocs-material
theme:
name: material
palette:
primary: indigo
accent: indigo
features:
- navigation.tabs
- navigation.sections
- search.suggest
extra_css:
- css/extra.css
extra_javascript:
- js/extra.js
- path: js/analytics.mjs
type: module
plugins:
- search:
lang: en
min_search_length: 3
- tags
- blog
流行插件:
search - 全文搜索 (内置,默认启用)blog - 博客功能 (Material 主题)tags - 内容分类social - 社交媒体卡片注意: 定义
plugins会禁用默认插件。请显式添加- search。
markdown_extensions:
- toc:
permalink: true
separator: "-"
- tables
- fenced_code
- admonition
- pymdownx.highlight
- pymdownx.superfences
# Deploy to gh-pages branch
mkdocs gh-deploy
# With options
mkdocs gh-deploy --force --message "Deploy docs"
# Build static files
mkdocs build
# Files output to site/ directory
# Upload to any static host
创建 docs/CNAME 文件:
docs.example.com
mkdocs new my-docsmkdocs.yml,设置 site_name 和 navdocs/mkdocs servemkdocs buildmkdocs gh-deployBash(mkdocs build --dry-run)
如果干净: Bash(mkdocs serve -v) (开发预览)。
docs/new-section/index.md 和内容文件mkdocs.yml 中的 navtheme.custom_dir: custom_theme/Bash(which mkdocs || echo "Install: pip install mkdocs")Bash(mkdocs build --dry-run)Grep -r "ERROR" site/每周安装量
44
仓库
GitHub 星标数
51
首次出现
2026年1月24日
安全审计
安装于
cursor37
codex36
gemini-cli36
opencode36
github-copilot34
amp31
MkDocs is a fast, simple static site generator for building project documentation from Markdown files. Configuration uses a single YAML file (mkdocs.yml).
# Install MkDocs
pip install mkdocs
# Verify installation
mkdocs --version
# Create project structure
mkdocs new my-project
cd my-project
# Start development server
mkdocs serve
Project Structure Created:
my-project/
├── mkdocs.yml # Configuration file
└── docs/
└── index.md # Homepage
# mkdocs.yml
site_name: My Project
site_url: https://example.com/
nav:
- Home: index.md
- About: about.md
| Command | Purpose |
|---|---|
mkdocs new PROJECT | Create new project |
mkdocs serve | Start dev server (localhost:8000) |
mkdocs build | Build static site to site/ |
mkdocs gh-deploy | Deploy to GitHub Pages |
mkdocs get-deps | Show required packages |
Common Options:
-f, --config-file FILE - Use custom config file-s, --strict - Fail on warnings-d, --site-dir DIR - Custom output directory--dirty - Only rebuild changed files--clean - Clean output before buildproject/
├── mkdocs.yml # Configuration (required)
├── docs/
│ ├── index.md # Homepage
│ ├── about.md # Additional pages
│ ├── user-guide/
│ │ ├── index.md # Section homepage
│ │ ├── getting-started.md
│ │ └── configuration.md
│ ├── img/ # Images
│ │ └── logo.png
│ └── css/ # Custom CSS
│ └── extra.css
└── custom_theme/ # Theme customizations (optional)
└── main.html
# Automatic navigation (alphabetically sorted)
# Omit nav key to auto-generate
# Explicit navigation with sections
nav:
- Home: index.md
- User Guide:
- Getting Started: user-guide/getting-started.md
- Configuration: user-guide/configuration.md
- API Reference: api/
- External Link: https://example.com/
# Link to another page
[See Configuration](configuration.md)
# Link to page in another directory
[Installation](../getting-started/installation.md)
# Link to section anchor
[See Options](configuration.md#options)
---
title: Custom Page Title
description: Page description for SEO
authors:
- John Doe
date: 2024-01-01
---
# Page Content Here
```python
def hello():
print("Hello, World!")
```
| Header 1 | Header 2 |
| -------- | -------- |
| Cell 1 | Cell 2 |
# Default MkDocs theme
theme:
name: mkdocs
color_mode: auto # light, dark, auto
user_color_mode_toggle: true
nav_style: primary # primary, dark, light
highlightjs: true
navigation_depth: 2
locale: en
# ReadTheDocs theme
theme:
name: readthedocs
prev_next_buttons_location: bottom
navigation_depth: 4
collapse_navigation: true
pip install mkdocs-material
theme:
name: material
palette:
primary: indigo
accent: indigo
features:
- navigation.tabs
- navigation.sections
- search.suggest
extra_css:
- css/extra.css
extra_javascript:
- js/extra.js
- path: js/analytics.mjs
type: module
plugins:
- search:
lang: en
min_search_length: 3
- tags
- blog
Popular Plugins:
search - Full-text search (built-in, enabled by default)blog - Blog functionality (Material theme)tags - Content categorizationsocial - Social media cardsNote: Defining
pluginsdisables defaults. Add- searchexplicitly.
markdown_extensions:
- toc:
permalink: true
separator: "-"
- tables
- fenced_code
- admonition
- pymdownx.highlight
- pymdownx.superfences
# Deploy to gh-pages branch
mkdocs gh-deploy
# With options
mkdocs gh-deploy --force --message "Deploy docs"
# Build static files
mkdocs build
# Files output to site/ directory
# Upload to any static host
Create docs/CNAME file:
docs.example.com
mkdocs new my-docsmkdocs.yml with site_name and navdocs/mkdocs servemkdocs buildmkdocs gh-deployBash(mkdocs build --dry-run)
If clean: Bash(mkdocs serve -v) (dev preview).
docs/new-section/index.md and content filesnav in mkdocs.ymltheme.custom_dir: custom_theme/Bash(which mkdocs || echo "Install: pip install mkdocs")Bash(mkdocs build --dry-run)Grep -r "ERROR" site/Weekly Installs
44
Repository
GitHub Stars
51
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
cursor37
codex36
gemini-cli36
opencode36
github-copilot34
amp31
minimax-docx:基于 OpenXML SDK 的 DOCX 文档自动化创建与编辑工具
1,500 周安装