Skip to content

Commit b6307dc

Browse files
ngzhianMs2ger
andauthored
Upgrade to Sphinx 4.0.0 (#1387)
Changes: https://www.sphinx-doc.org/en/master/changes.html#release-4-0-0-released-may-09-2021 Things to note: - docutils updated to 0.17 https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-17-2021-04-03 the big change here is to use semantic elements, <div class="section"> is now <section>, I see this a whole bunch when I diff the output HTML. - supposedly some html themes break due to the docutils change, probably due to divs not matching, I don't see any visible breakage, so it should be fine - mathjax 3 https://docs.mathjax.org/en/latest/upgrading/whats-new-3.0.html it's faster to render, we need to tweak our configuration a bit, to camelCase, so updated it in conf.py I diffed the output html, some differences I noted: - div -> section as noted above - a new meta tag for Docutils - link tag for css, the type and href attributs swapped places - script tag for documetation_options, id and data-url_root swapped places - some css changes in sphinx css files Co-authored-by: Ms2ger <[email protected]>
1 parent 93054e7 commit b6307dc

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

Diff for: .github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- run: pip install bikeshed && bikeshed update
5353
- run: pip install six
5454
- run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
55-
- run: pip install sphinx==3.5.4
55+
- run: pip install sphinx==4.0.0
5656
- run: cd document/core && make all
5757
- uses: actions/upload-artifact@v2
5858
with:

Diff for: document/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pipenv shell
4242
Install Python dependencies:
4343

4444
```
45-
pipenv install Sphinx==3.5.4
45+
pipenv install Sphinx==4.0.0
4646
```
4747

4848
### Checking out the repository

Diff for: document/core/conf.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,9 @@
492492
.. include:: /""" + pwd + """/util/macros.def
493493
"""
494494

495-
# https://www.sphinx-doc.org/en/master/usage/extensions/math.html#confval-mathjax_config
496-
# http://docs.mathjax.org/en/v2.7-latest/options/input-processors/TeX.html
497-
mathjax_config = {
498-
'TeX': { 'MAXBUFFER': 30*1024 },
495+
# https://www.sphinx-doc.org/en/master/usage/extensions/math.html#confval-mathjax3_config
496+
# https://docs.mathjax.org/en/latest/web/configuration.html#configuration
497+
# https://docs.mathjax.org/en/latest/options/input/tex.html#tex-maxbuffer
498+
mathjax3_config = {
499+
'tex': { 'maxBuffer': 30*1024 },
499500
}

Diff for: document/core/util/bikeshed/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@
3838
assert(main_macros_def in rst_prolog)
3939
rst_prolog = rst_prolog.replace(main_macros_def, "/" + pwd + "/util/macros.def")
4040

41-
del mathjax_config
41+
del mathjax3_config

0 commit comments

Comments
 (0)