File tree Expand file tree Collapse file tree 9 files changed +46
-1
lines changed
src/sphinx_substitution_extensions Expand file tree Collapse file tree 9 files changed +46
-1
lines changed Original file line number Diff line number Diff line change 45
45
run : |
46
46
make build-sample
47
47
48
+ - name : " Build sample parallel"
49
+ run : |
50
+ make build-sample-parallel
51
+
48
52
- name : " Run tests"
49
53
run : |
50
54
pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests tests/ --cov-report=xml
Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ build-sample:
29
29
rm -rf sample/build
30
30
sphinx-build -W -b html sample/source sample/build
31
31
32
+ .PHONY : build-sample-parallel
33
+ build-sample-parallel :
34
+ rm -rf sample/build
35
+ sphinx-build -j 2 -W -b html sample/source sample/build
36
+
32
37
.PHONY : open-sample
33
38
open-sample :
34
39
python -c ' import os, webbrowser; webbrowser.open("file://" + os.path.abspath("sample/build/index.html"))'
Original file line number Diff line number Diff line change
1
+ =======
2
+ Five
3
+ =======
4
+
Original file line number Diff line number Diff line change
1
+ =======
2
+ Four
3
+ =======
4
+
Original file line number Diff line number Diff line change @@ -71,3 +71,18 @@ Inline ``:code:``
71
71
:code: `echo "The author is |author|" `
72
72
73
73
:substitution-code: `echo "The author is |author|" `
74
+
75
+ ..
76
+
77
+ This is a test of parallel document builds. You need at least 5
78
+ documents. See:
79
+ https://github.com/adamtheturtle/sphinx-substitution-extensions/pull/173
80
+
81
+ .. toctree ::
82
+ :hidden:
83
+
84
+ one
85
+ two
86
+ three
87
+ four
88
+ five
Original file line number Diff line number Diff line change
1
+ =====
2
+ One
3
+ =====
4
+
Original file line number Diff line number Diff line change
1
+ =======
2
+ Three
3
+ =======
4
+
Original file line number Diff line number Diff line change
1
+ =====
2
+ Two
3
+ =====
4
+
Original file line number Diff line number Diff line change @@ -146,11 +146,12 @@ def substitution_code_role( # pylint: disable=dangerous-default-value
146
146
}
147
147
148
148
149
- def setup (app : Sphinx ) -> None :
149
+ def setup (app : Sphinx ) -> dict :
150
150
"""
151
151
Add the custom directives to Sphinx.
152
152
"""
153
153
app .add_config_value ('substitutions' , [], 'html' )
154
154
directives .register_directive ('prompt' , SubstitutionPrompt )
155
155
directives .register_directive ('code-block' , SubstitutionCodeBlock )
156
156
app .add_role ('substitution-code' , substitution_code_role )
157
+ return {'parallel_read_safe' : True }
You can’t perform that action at this time.
0 commit comments