mirror of
https://github.com/openmlsys/openmlsys-zh.git
synced 2026-04-24 18:43:03 +08:00
build: switch math rendering to mdbook-katex
Use mdbook-katex in pre-render mode for both books, pin mdBook to a compatible version, update build scripts and workflows, and replace the old MathJax regression tests with KaTeX coverage.
This commit is contained in:
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
@@ -21,7 +21,10 @@ jobs:
|
||||
- name: Setup mdBook
|
||||
uses: peaceiris/actions-mdbook@v2
|
||||
with:
|
||||
mdbook-version: 'latest'
|
||||
mdbook-version: '0.4.48'
|
||||
|
||||
- name: Install mdBook KaTeX
|
||||
run: cargo install mdbook-katex --locked
|
||||
|
||||
- name: Run mdBook regression tests
|
||||
run: |
|
||||
@@ -29,7 +32,8 @@ jobs:
|
||||
python3 -m unittest discover -s tests -p 'test_prepare_mdbook_zh.py'
|
||||
python3 -m unittest discover -s tests -p 'test_assemble_docs_publish_tree.py'
|
||||
python3 -m unittest discover -s tests -p 'test_ensure_book_resources.py'
|
||||
python3 -m unittest discover -s tests -p 'test_mdbook_mathjax.py'
|
||||
python3 -m unittest discover -s tests -p 'test_mdbook_katex.py'
|
||||
python3 -m unittest discover -s tests -p 'test_mdbook_katex_config.py'
|
||||
|
||||
- name: Build English HTML with mdBook
|
||||
run: bash build_mdbook.sh
|
||||
@@ -49,7 +53,10 @@ jobs:
|
||||
- name: Setup mdBook
|
||||
uses: peaceiris/actions-mdbook@v2
|
||||
with:
|
||||
mdbook-version: 'latest'
|
||||
mdbook-version: '0.4.48'
|
||||
|
||||
- name: Install mdBook KaTeX
|
||||
run: cargo install mdbook-katex --locked
|
||||
|
||||
- name: Build Chinese HTML with mdBook
|
||||
run: bash build_mdbook_zh.sh
|
||||
|
||||
8
.github/workflows/update_docs.yml
vendored
8
.github/workflows/update_docs.yml
vendored
@@ -32,7 +32,10 @@ jobs:
|
||||
- name: Setup mdBook
|
||||
uses: peaceiris/actions-mdbook@v2
|
||||
with:
|
||||
mdbook-version: 'latest'
|
||||
mdbook-version: '0.4.48'
|
||||
|
||||
- name: Install mdBook KaTeX
|
||||
run: cargo install mdbook-katex --locked
|
||||
|
||||
- name: Run mdBook regression tests
|
||||
run: |
|
||||
@@ -40,7 +43,8 @@ jobs:
|
||||
python3 -m unittest discover -s tests -p 'test_prepare_mdbook_zh.py'
|
||||
python3 -m unittest discover -s tests -p 'test_assemble_docs_publish_tree.py'
|
||||
python3 -m unittest discover -s tests -p 'test_ensure_book_resources.py'
|
||||
python3 -m unittest discover -s tests -p 'test_mdbook_mathjax.py'
|
||||
python3 -m unittest discover -s tests -p 'test_mdbook_katex.py'
|
||||
python3 -m unittest discover -s tests -p 'test_mdbook_katex_config.py'
|
||||
|
||||
- name: Build English HTML with mdBook
|
||||
run: bash build_mdbook.sh
|
||||
|
||||
Reference in New Issue
Block a user