跳转至

mkdocs Blog 插件

目的:用 Material blog plugin 添加 changelog / blog 关联:[B1-5]


1. 插件

mkdocs-material 自带 blog support: - blog/ 目录 - 自动分类 - 索引页 - archive


2. 3 步配置

2.1 Step 1: 安装

pip install mkdocs-material

1 行

2.2 Step 2: 配置

# mkdocs.yml
plugins:
  - blog:
      blog_dir: blog
      post_date_format: long
      blog_toc: true
      pagination: true

5 行

2.3 Step 3: 写 post

blog/
├── index.md       # 索引
├── posts/
│   ├── 2026-06-01-launch.md
│   └── 2026-06-05-changelog.md
└── .meta.yml      # (可选) 作者

3 文件


3. Post 模板

---
title: Claude Code 1.0 启动
date: 2026-06-01
authors:
  - name: Your Name
    link: https://github.com/you
tags:
  - launch
  - announcement
---

# Claude Code 1.0 启动

Content here...

## 新功能

- 功能 1
- 功能 2

frontmatter + content


4. 5 个最佳实践

  1. date 排序 —— 自动
  2. tags 分类 —— 过滤
  3. archive 页 —— 历史
  4. pagination —— 每页 5 post
  5. description —— SEO

5. 5 个 post 类型

  1. 启动公告
  2. 周更 changelog
  3. 性能改进
  4. 安全公告
  5. 教程发布

5 类


6. 总结

Blog = plugin + blog/ 目录 + 5 类 post

下一步: - 看 B1-6 RSS