Fix bilingual tutorial indexes and internal links (#209)

* Fix bilingual tutorial index generation

* Check relative Markdown links in CI

* Harden documentation regression checks

* Reduce link parser complexity

* Run link checks for every repository change

---------

Co-authored-by: LinuxDev9002 <i@littlefisher.me>
This commit is contained in:
云微
2026-07-14 04:10:51 -07:00
committed by GitHub
parent 8bfc912d6a
commit e08f604769
11 changed files with 456 additions and 37 deletions

23
.github/workflows/check-docs.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Check documentation
on:
push:
branches: ["main"]
pull_request:
permissions:
contents: read
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Test documentation scripts
run: python3 -m unittest scripts.test_check_internal_links scripts.test_generate_toc
- name: Regenerate documentation indexes
run: python3 scripts/generate_toc.py
- name: Verify generated documentation is current
run: git diff --exit-code -- README.md README.zh.md src/SUMMARY.md src/SUMMARY.zh.md
- name: Check relative Markdown links
run: python3 scripts/check_internal_links.py