File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- docs /
1+ docs /
2+ __pycache__ /
Original file line number Diff line number Diff line change 1+ ## 一、课程内容
2+ 待补充
3+
4+ ## 二、考核方式
5+ 待补充
6+
7+ ## 三、修读攻略
8+ 202X级XXX:
9+
10+ - 待补充
11+ - 待补充
12+
13+ ## 四、注意事项
14+ 待补充
Original file line number Diff line number Diff line change 1+ from pathlib import PurePosixPath
2+
3+
4+ def on_files (files , config ):
5+ for file in files :
6+ src_uri = file .src_uri
7+
8+ # docs/index.md 在 MkDocs 内部通常表现为 index.md
9+ # 目标:/edit/main/README.md
10+ if src_uri == "index.md" :
11+ file .edit_uri = "README.md"
12+ continue
13+
14+ path = PurePosixPath (src_uri )
15+
16+ # 生成页:
17+ # 01-基础必修课/C++编程基础.md
18+ #
19+ # 原始源文件:
20+ # 01-基础必修课/C++编程基础/README.md
21+ if path .suffix == ".md" and len (path .parts ) >= 2 :
22+ course_group = path .parts [0 ]
23+ course_name = path .stem
24+ file .edit_uri = f"{ course_group } /{ course_name } /README.md"
25+
26+ return files
Original file line number Diff line number Diff line change 11site_name : 华南理工未来技术学院课程攻略
22theme : readthedocs
3- repo_url : https://github.com/OpenFuTech/SCUT-FT-Guide
3+ repo_url : https://github.com/OpenFuTech/SCUT-FT-Guide
4+ edit_uri : edit/main/
5+
6+ hooks :
7+ - hooks.py
You can’t perform that action at this time.
0 commit comments