From 481cf9704196db7f6c05054943d184bfea303466 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Wed, 15 Mar 2023 20:49:47 -0700 Subject: [PATCH v2 6/8] wip: docs: copy or inline css --- doc/src/sgml/Makefile | 4 +--- doc/src/sgml/meson.build | 2 +- doc/src/sgml/stylesheet-common.xsl | 20 ++++++++++++++++++++ doc/src/sgml/stylesheet-hh.xsl | 10 +++++++++- doc/src/sgml/stylesheet-html-nochunk.xsl | 20 ++++++++++++++++++++ doc/src/sgml/stylesheet.xsl | 15 ++++++--------- 6 files changed, 57 insertions(+), 14 deletions(-) diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index 1b098f983ec..3f971f6eb33 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -53,7 +53,7 @@ else XSLTPROC = $(missing) xsltproc endif -override XSLTPROCFLAGS += --stringparam pg.version '$(VERSION)' +override XSLTPROCFLAGS += --xincludestyle --stringparam pg.version '$(VERSION)' GENERATED_SGML = version.sgml \ @@ -144,14 +144,12 @@ html: html-stamp html-stamp: stylesheet.xsl postgres-full.xml $(ALL_IMAGES) $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $(wordlist 1,2,$^) - cp $(srcdir)/stylesheet.css html/ touch $@ htmlhelp: htmlhelp-stamp htmlhelp-stamp: stylesheet-hh.xsl postgres-full.xml $(ALL_IMAGES) $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(wordlist 1,2,$^) - cp $(srcdir)/stylesheet.css htmlhelp/ touch $@ # single-page HTML diff --git a/doc/src/sgml/meson.build b/doc/src/sgml/meson.build index f24acebb0fe..bbe285b29bb 100644 --- a/doc/src/sgml/meson.build +++ b/doc/src/sgml/meson.build @@ -104,7 +104,7 @@ if xsltproc_bin.found() xsltproc_flags = [ '--nonet', '--stringparam', 'pg.version', pg_version, - '--param', 'website.stylesheet', '1' + '--xincludestyle', ] xsltproc = xmltools_wrapper + [ diff --git a/doc/src/sgml/stylesheet-common.xsl b/doc/src/sgml/stylesheet-common.xsl index d2928f86eb7..25d05b9e5f4 100644 --- a/doc/src/sgml/stylesheet-common.xsl +++ b/doc/src/sgml/stylesheet-common.xsl @@ -41,6 +41,8 @@ 1 + + @@ -122,5 +124,23 @@ + + + stylesheet.css + + + + + + + + + + + + https://www.postgresql.org/media/css/docs-complete.css + + + diff --git a/doc/src/sgml/stylesheet-hh.xsl b/doc/src/sgml/stylesheet-hh.xsl index 568ccf36d2a..6f6c6c64626 100644 --- a/doc/src/sgml/stylesheet-hh.xsl +++ b/doc/src/sgml/stylesheet-hh.xsl @@ -1,5 +1,6 @@ @@ -9,7 +10,6 @@ - @@ -19,6 +19,14 @@ + + + + + + + + diff --git a/doc/src/sgml/stylesheet-html-nochunk.xsl b/doc/src/sgml/stylesheet-html-nochunk.xsl index 8167127b93a..560f6a0b0a7 100644 --- a/doc/src/sgml/stylesheet-html-nochunk.xsl +++ b/doc/src/sgml/stylesheet-html-nochunk.xsl @@ -1,5 +1,7 @@ @@ -7,6 +9,24 @@ + + + + + + + + + + + + + + + + diff --git a/doc/src/sgml/stylesheet.xsl b/doc/src/sgml/stylesheet.xsl index f9163e7d946..c551b9cd809 100644 --- a/doc/src/sgml/stylesheet.xsl +++ b/doc/src/sgml/stylesheet.xsl @@ -1,7 +1,8 @@ + xmlns="http://www.w3.org/1999/xhtml" + xmlns:xi="http://www.w3.org/2001/XInclude"> @@ -17,17 +18,13 @@ - - - - stylesheet.css - - https://www.postgresql.org/media/css/docs-complete.css - - + + + + -- 2.38.0