Repository navigation
Expand file tree
/
Copy pathmkdocs.yml
More file actions
195 lines (156 loc) · 5.9 KB
/
Copy pathmkdocs.yml
File metadata and controls
195 lines (156 loc) · 5.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# Official tutorial
# MkDocs: https://www.mkdocs.org/user-guide/configuration/
# MkDocs-Material: https://squidfunk.github.io/mkdocs-material/
site_name: KFACBT 的博客
site_description: Anyway, keep learning.
site_author: gytxtx
site_url: https://blog-gytxtx.pages.dev/
# site_url: http://www.example.com/
# GitHub Repo link
repo_url: https://github.com/gytxtx/Blog/
repo_name: gytxtx/Blog
# 自定义导航栏
nav:
- 首页: index.md
- 博客:
- blog/index.md
- blog/tags.md
- 关于: blog/about.md
- 友链: blog/links.md
- 开往: https://www.travellings.cn/go.html
theme:
name: material
# 扩展 MkDocs-Material 主题
custom_dir: overrides
# 设置站点徽标与标签页图标,支持 PNG 与 SVG
logo: img/logo.jpg
favicon: img/favicon.ico
language: zh # 中文,解决中文搜索问题
features:
- navigation.expand
- tabs
- navigation.top # "返回顶部" 按钮
- navigation.footer # 自定义页脚(显示上一页和下一页的链接)
- navigation.tabs # 将菜单呈现在位于上述视口标题下方的菜单层中。
# - navigation.indexes # 启用章节索引页后,文档可以直接附加到章节,这对于提供概览页面特别有用。
- toc.follow # 当启用目录的锚点跟随功能时,侧边栏会自动滚动,以便活动锚点始终可见。
- navigation.instant # 启用即时加载后,所有内部链接的点击都将被拦截并通过XHR进行调度,而无需完全重新加载页面。
- navigation.instant.progress # 依赖于 `navigation.instant` 的页面加载进度指示器
- search.highlight # 启用搜索高亮显示后,当用户点击搜索结果时,Material for MkDocs 将在点击链接后高亮显示所有匹配结果。
# 提供切换 日间 / 夜间 模式的选项
palette:
# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
# name: Switch to light mode
name: 切换到明亮模式
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
# 主色 / 强调色
primary: green
accent: green
toggle:
icon: material/brightness-7
# name: Switch to dark mode
name: 切换到暗黑模式
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
# 主色
primary: black
toggle:
icon: material/brightness-4
# name: Switch to system preference
name: 切换到系统偏好
extra:
social:
- icon: fontawesome/brands/github
name: GitHub 个人主页
link: https://github.com/gytxtx/
- icon: material/email-outline
name: 使用 E-Mail 联系我
link: mailto:gytxtx@outlook.com
- icon: material/train
name: 跳转至“开往”
link: https://www.travellings.cn/go.html
# Google Analytics
analytics:
provider: google
property: G-29NRC21SS3
markdown_extensions:
- attr_list # https://squidfunk.github.io/mkdocs-material/reference/images/
# 文档内嵌图标支持
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
# - pymdownx.tabbed # https://squidfunk.github.io/mkdocs-material/reference/content-tabs/
- nl2br # newline-to-break
- toc:
permalink: '#' # heading anchor
slugify: !!python/object/apply:pymdownx.slugs.slugify # 解决中文标题解析问题
kwds:
case: lower
max_length: 64
- admonition
- codehilite:
guess_lang: false
linenums: false
- footnotes
- meta
- def_list
- pymdownx.arithmatex
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.critic
- pymdownx.details
# - pymdownx.emoji:
# emoji_generator: !!python/name:pymdownx.emoji.to_png
- pymdownx.inlinehilite
- pymdownx.magiclink
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tasklist
- pymdownx.tilde
# Tab 选项卡支持
# - pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
# 网格卡片
# - attr_list
# - md_in_html
plugins:
- search
# 灯箱,提供沉浸式的图片显示效果
- glightbox
- blog: # 博客插件
blog_toc: true # Blog 索引页支持使用文章标题生成目录
- tags: # 与博客集成的标签插件
# 从 9.6.0 版本开始,此设置已弃用,因为此版本对标签插件进行了彻底重写,使其比上一版本功能强大得多。现在,标签列表可以在任何页面上使用。
# tags_file: blog/tags.md # 标签索引文件
# 在页面底部显示 Git 编辑日期信息(需要进行一些配置,具体参见 https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/ 文档。)
# 如果站点托管在 Cloudflare Pages,则参阅 https://pumpkinjui.pages.dev/blog/2025/03/22/pages_fetch_depth.html 。
- git-revision-date-localized:
enable_creation_date: true
# 默认值为 `false`。当 Git 不可用时,启用此选项将回退到执行 `mkdocs build` 命令时的时间戳作为修订日期。这意味着修订日期可能不准确,但如果您希望项目在没有 Git 访问权限的环境中也能成功构建,这种处理方式是可接受的。
fallback_to_build_date: true
type: iso_datetime
# 设置时区
timezone: Asia/Shanghai
- social: # 社交卡片 插件
cards_layout_options:
# 中文字体,解决默认字体无 CJK 字符的问题
font_family: Noto Sans SC
# - autolinks
# MkDocs 排除插件,让 `docs` 文件夹中的指定文件不进入构建的站点目录中。
- exclude:
glob:
- "*.tmp"
- "*.pdf"
- "*.gz"
regex:
- '.*\.(tmp|bin|tar)$'
copyright: Copyright © 2025-2026 KFACBT. All rights reserved.