Skip to content

Commit 361d0ee

Browse files
committed
fix: Use mkdocs-static-i18n plugin for proper bilingual site
- Rename all _zh.md to .zh.md (required by i18n plugin suffix mode) - Add mkdocs-static-i18n plugin with Chinese nav configuration - Remove separate mkdocs.zh.yml (no longer needed) - Simplify deploy workflow back to single mkdocs gh-deploy - Fix internal links in Chinese docs to use new .zh.md naming - Remove navigation.instant (incompatible with language switcher)
1 parent 8d2f0dc commit 361d0ee

28 files changed

Lines changed: 62 additions & 79 deletions

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,5 @@ jobs:
3636
- name: Install dependencies
3737
run: pip install -r docs-requirements.txt
3838

39-
- name: Build English site
40-
run: mkdocs build --site-dir site
41-
42-
- name: Build Chinese site
43-
run: mkdocs build --config-file mkdocs.zh.yml
44-
4539
- name: Deploy to GitHub Pages
46-
run: |
47-
pip install ghp-import
48-
ghp-import site -p -f -r origin -b gh-pages
40+
run: mkdocs gh-deploy --force
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 中文数据处理
22

3-
**[English](chinese-data.md)** | **[中文](chinese-data_zh.md)**
3+
**[English](chinese-data.md)** | **[中文](chinese-data.zh.md)**
44

55
---
66

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 使用自定义数据集
22

3-
**[English](custom-datasets.md)** | **[中文](custom-datasets_zh.md)**
3+
**[English](custom-datasets.md)** | **[中文](custom-datasets.zh.md)**
44

55
---
66

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 分布式与内存高效训练
22

3-
**[English](distributed-training.md)** | **[中文](distributed-training_zh.md)**
3+
**[English](distributed-training.md)** | **[中文](distributed-training.zh.md)**
44

55
---
66

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 超参数调优
22

3-
**[English](hyperparameters.md)** | **[中文](hyperparameters_zh.md)**
3+
**[English](hyperparameters.md)** | **[中文](hyperparameters.zh.md)**
44

55
---
66

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# prepare_data.py
22

3-
**[English](prepare-data.md)** | **[中文](prepare-data_zh.md)**
3+
**[English](prepare-data.md)** | **[中文](prepare-data.zh.md)**
44

55
---
66

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# run_pipeline.py
22

3-
**[English](run-pipeline.md)** | **[中文](run-pipeline_zh.md)**
3+
**[English](run-pipeline.md)** | **[中文](run-pipeline.zh.md)**
44

55
---
66

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# visualization.run_visualization
22

3-
**[English](visualization.md)** | **[中文](visualization_zh.md)**
3+
**[English](visualization.md)** | **[中文](visualization.zh.md)**
44

55
---
66

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 附录
22

3-
**[English](faq.md)** | **[中文](faq_zh.md)**
3+
**[English](faq.md)** | **[中文](faq.zh.md)**
44

55
---
66

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 中文数据集示例
22

3-
**[English](chinese-dataset.md)** | **[中文](chinese-dataset_zh.md)**
3+
**[English](chinese-dataset.md)** | **[中文](chinese-dataset.zh.md)**
44

55
---
66

0 commit comments

Comments
 (0)