From 5595a70bd5a73e4acaef3af6157aa50274721669 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 24 Feb 2021 12:23:01 -0800 Subject: [PATCH] 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 --- Documentation/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 $<