diff options
author | Ulrich Müller <ulm@gentoo.org> | 2020-01-28 20:40:51 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2020-02-03 01:01:19 +0100 |
commit | 563f4c60d694a0ce2e053a88fdf11f1f88e63dcd (patch) | |
tree | 86025421a75557c2bf1ca632901eeed02dfb0c48 /Makefile | |
parent | devbook.xsl: Define relative_path_depth_recursion only once. (diff) | |
download | devmanual-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-- | Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) \ |