Skip to content

Commit 365d06c

Browse files
authored
add Makefile target for single HTML page (ansible#25313)
1 parent 99a30f8 commit 365d06c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/docsite/Makefile

+10-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ else
88
CPUS ?= $(shell nproc)
99
endif
1010

11+
assertrst:
12+
ifndef rst
13+
$(error specify document or pattern with rst=somefile.rst)
14+
endif
15+
1116
all: docs
1217

1318
docs: clean htmldocs
@@ -50,4 +55,8 @@ staticmin:
5055
cat _themes/srtd/static/css/theme.css | sed -e 's/^[ ]*//g; s/[ ]*$$//g; s/\([:{;,]\) /\1/g; s/ {/{/g; s/\/\*.*\*\///g; /^$$/d' | sed -e :a -e '$$!N; s/\n\(.\)/\1/; ta' > _themes/srtd/static/css/theme.min.css
5156

5257
epub:
53-
(CPUS=$(CPUS) make -f Makefile.sphinx epub)
58+
(CPUS=$(CPUS) make -f Makefile.sphinx epub)
59+
60+
htmlsingle: assertrst
61+
sphinx-build -j $(CPUS) -b html -d _build/doctrees ./rst _build/html rst/$(rst)
62+
@echo "Output is in _build/html/$(rst)"

0 commit comments

Comments
 (0)