aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2020-01-28 20:40:51 +0100
committerUlrich Müller <ulm@gentoo.org>2020-02-03 01:01:19 +0100
commit563f4c60d694a0ce2e053a88fdf11f1f88e63dcd (patch)
tree86025421a75557c2bf1ca632901eeed02dfb0c48 /Makefile
parentdevbook.xsl: Define relative_path_depth_recursion only once. (diff)
downloaddevmanual-563f4c60d694a0ce2e053a88fdf11f1f88e63dcd.tar.gz
devmanual-563f4c60d694a0ce2e053a88fdf11f1f88e63dcd.tar.bz2
devmanual-563f4c60d694a0ce2e053a88fdf11f1f88e63dcd.zip
Support offline browsing.
Pass an "offline" flag to devbook.xsl, which disables loading of external assets and loads a simple CSS instead. This will replace the fragile patching in the app-doc/devmanual ebuild. offline.css was originally contributed (as fallback.css) by Lucas Ramage in bug 617724. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3fb4c52..ef2c735 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,9 @@ HTMLS := $(subst text.xml,index.html,$(XMLS))
ECLASS_HTMLS := $(wildcard eclass-reference/*/index.html)
IMAGES := $(patsubst %.svg,%.png,$(SVGS))
+# Nonzero value disables external assets for offline browsing.
+OFFLINE = 0
+
all: prereq validate build documents.js
prereq:
@@ -49,7 +52,7 @@ documents.js: bin/build_search_documents.py $(XMLS)
#
.SECONDEXPANSION:
%.html: $$(dir $$@)text.xml devbook.xsl xsl/*.xsl $$(subst text.xml,index.html,$$(wildcard $$(dir $$@)*/text.xml))
- xsltproc devbook.xsl $< > $@
+ xsltproc --param offline "$(OFFLINE)" devbook.xsl $< > $@
validate: prereq
@xmllint --noout --dtdvalid devbook.dtd $(XMLS) \