mkdocs Social Links¶
目的:在 mkdocs 文档站加 social links(GitHub / Twitter / Discord) 关联:[B1-7]
1. Material 主题配置¶
# mkdocs.yml
theme:
name: material
palette:
primary: indigo
features:
- navigation.tabs
- navigation.social # 启用 social
social:
- icon: fontawesome/brands/github
link: https://github.com/dvxiaofan/cc-claude-code
name: GitHub
- icon: fontawesome/brands/twitter
link: https://twitter.com/claudeai
name: Twitter
- icon: fontawesome/brands/discord
link: https://discord.gg/anthropic
name: Discord
4 步。
2. 5 个 social 平台¶
| 平台 | 图标 | 用途 |
|---|---|---|
| GitHub | fontawesome/brands/github |
代码 |
fontawesome/brands/twitter |
公告 | |
| Discord | fontawesome/brands/discord |
社区 |
| YouTube | fontawesome/brands/youtube |
视频 |
| RSS | fontawesome/solid/rss |
订阅 |
5 平台。
3. 5 个最佳实践¶
- 3-5 平台 —— 不要太多
- 品牌一致 —— 用官方图标
- 可访问 —— 文字替代
- 最新 —— 定期检查链接
- 不重复 —— 不要和 footer 重复
4. 总结¶
Social = 4 步配置 + 5 平台 + 5 实践。
下一步: - 看 B1-8 中文同义词