summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2021-02-24 12:23:01 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-02-24 12:23:05 -0800
commit5595a70bd5a73e4acaef3af6157aa50274721669 (patch)
tree7e806e6a832930989e032a2195fe1ac7e339da45
parenta651bb4550c24c5c4f8656e4ed0a21c9c0a400dc (diff)
downloadsubsurface-5595a70bd5a73e4acaef3af6157aa50274721669.tar.gz
documentation: automate creation of web facing manuals
We already had the script to post-process the HTML files in the repo, but we didn't automate use of that script in the Makefile. The .wp suffix is misleading and historical (we no longer us WordPress), but it's what I am used to and I didn't come up with something more obvious or better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--Documentation/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index e6b0cc165..3b2baf522 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -34,6 +34,17 @@ $(OUT)%.html: %.txt
$(ASCIIDOC) -a toc -a toclevels=3 -a themedir=$(PWD) -a theme=$(THEME) -o $@ $< || \
cp $(<:%.txt=%.html.git) $@
+# for the web facing version of the desktop manual, just use the post-processing script
+user-manual.html.wp: user-manual.html
+ bash ../scripts/prep-manual.sh $<
+
+# for the web facing version of the mobile manual, re-create the HTML with only one level in
+# the table of context and then post process
+mobile-manual-v3.html.wp: mobile-manual-v3.txt
+ $(ASCIIDOC) -a toc -a toclevels=1 -a themedir=$(PWD) -a theme=$(THEME) -o $(<:%.txt=%.html.tmp) $< && \
+ bash ../scripts/prep-manual.sh $(<:%.txt=%.html.tmp) && \
+ mv $(<:%.txt=%.html.tmp.wp) $@
+
# Alternatively::
$(OUT)$(DOCNAME).xhtml: $(DOCSOURCE)
$(A2X) --icons -f xhtml $<