Skip to content

Commit 25d8022

Browse files
committed
feat: add tags plugin
1 parent 7e8a244 commit 25d8022

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

docs-en/tags.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Tags
2+
3+
Below is a list of problems classified by tags, suitable for focused practice on a certain type of problem.
4+
5+
<!-- material/tags -->

docs/tags.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# 标签
2+
3+
以下是按标签分类的题目列表,适合针对某一类题目进行专项练习。
4+
5+
<!-- material/tags -->

main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,13 @@ def get_paths(dirs: str, m: int):
221221
config += " - 程序员面试金典:\n"
222222
config += "\n".join(navdata_cn["lcci"])
223223
config += "\n"
224+
config += " - 专项训练: tags.md\n"
225+
config += "\n"
224226
en_config += " - Cracking the Coding Interview:\n"
225227
en_config += "\n".join(navdata_en["lcci"])
226228
en_config += "\n"
229+
en_config += " - Focused Training: tags.md\n"
230+
en_config += "\n"
227231

228232
with open("mkdocs.yml", "w", encoding="utf-8") as f:
229233
f.write(config)

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ theme:
6262
plugins:
6363
- search:
6464
separator: '[\s\u200b\-_,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
65+
- tags:
66+
tags_file: tags.md
6567

6668
markdown_extensions:
6769
- pymdownx.superfences

0 commit comments

Comments
 (0)