File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -18,4 +18,11 @@ poetry check
18
18
poetry run pip check
19
19
cd ./doc
20
20
poetry run doc8 --ignore-path build --max-line-length 100 -q
21
+ # check for broken links in the docs ############
22
+ poetry run sphinx-build -b linkcheck -q -D linkcheck_timeout=5 ./source ./build > /dev/null 2>&1
23
+ if [ $? -ne 0 ]; then
24
+ cat ./build/output.txt
25
+ exit 1
26
+ fi
27
+ # ################################################
21
28
cd ..
Original file line number Diff line number Diff line change 3
3
import os
4
4
from pathlib import Path
5
5
from sphinx .ext .autodoc import between
6
+ import shutil
6
7
import django
7
8
8
9
os .environ .setdefault ('DJANGO_SETTINGS_MODULE' , 'django_typer.tests.settings.base' )
@@ -97,4 +98,8 @@ def setup(app):
97
98
# app.connect('html-page-context', add_page_class)
98
99
99
100
app .add_directive ("literalinclude" , ExtendedLiteralInclude )
101
+
102
+ # https://sphinxcontrib-typer.readthedocs.io/en/latest/howto.html#build-to-multiple-formats
103
+ if Path (app .doctreedir ).exists ():
104
+ shutil .rmtree (app .doctreedir )
100
105
return app
You can’t perform that action at this time.
0 commit comments