Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb8059bd

Browse files
committed
docs: html: load stylesheet via custom.css.source
Until now the meson built docs did not have a working reference to the cssstylesheet, it was copied in the make target. Instead of duplicating that formeson, use the docbook-xsl parameter custom.css.source to reference it. Anadditional benefit of that approach is that the stylesheet is now included inthe single-file HTML documentation.Reported-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com>Discussion:https://postgr.es/m/3fc3bb9b-f7f8-d442-35c1-ec82280c564a@enterprisedb.com
1 parent0012979 commitb8059bd

File tree

6 files changed

+21
-14
lines changed

6 files changed

+21
-14
lines changed

‎doc/src/sgml/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ifndef FOP
3939
FOP =$(missing) fop
4040
endif
4141

42-
XMLINCLUDE = --path .
42+
XMLINCLUDE = --path . --path$(srcdir)
4343

4444
ifdefXMLLINT
4545
XMLLINT :=$(XMLLINT) --nonet
@@ -144,7 +144,6 @@ html: html-stamp
144144

145145
html-stamp: stylesheet.xsl postgres-full.xml$(ALL_IMAGES)
146146
$(XSLTPROC)$(XMLINCLUDE)$(XSLTPROCFLAGS)$(XSLTPROC_HTML_FLAGS)$(wordlist 1,2,$^)
147-
cp$(srcdir)/stylesheet.css html/
148147
touch$@
149148

150149
# single-page HTML

‎doc/src/sgml/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ if xsltproc_bin.found()
9696
xsltproc_flags= [
9797
'--nonet',
9898
'--stringparam','pg.version', pg_version,
99-
'--path','@OUTDIR@',
99+
'--path','@OUTDIR@','--path','@CURRENT_SOURCE_DIR@',
100100
]
101101

102102
xsltproc= xmltools_wrapper+ [

‎doc/src/sgml/stylesheet-html-common.xsl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
<xsl:paramname="make.graphic.viewport"select="0"/>
1919
<xsl:paramname="link.mailto.url">pgsql-docs@lists.postgresql.org</xsl:param>
2020
<xsl:paramname="toc.max.depth">2</xsl:param>
21+
<xsl:paramname="website.stylesheet"select="0"/>
22+
<xsl:paramname="custom.css.source">
23+
<xsl:iftest="$website.stylesheet = 0">stylesheet.css.xml</xsl:if>
24+
</xsl:param>
25+
<xsl:paramname="html.stylesheet">
26+
<xsl:iftest="not($website.stylesheet = 0)">https://www.postgresql.org/media/css/docs-complete.css</xsl:if>
27+
</xsl:param>
28+
2129

2230
<!--
2331
The below allows the stylesheets provided by the website to be applied fully

‎doc/src/sgml/stylesheet-html-nochunk.xsl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
<xsl:includehref="stylesheet-html-common.xsl" />
88
<xsl:includehref="stylesheet-speedup-xhtml.xsl" />
99

10+
<!-- except when referencing the online stylesheet, embed stylesheet-->
11+
<xsl:paramname="generate.css.header"select="$website.stylesheet = 0"/>
12+
1013
<!-- embed SVG images into output file-->
1114
<xsl:templatematch="imagedata[@format='SVG']">
1215
<xsl:variablename="filename">

‎doc/src/sgml/stylesheet.css.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!--
2+
wrapper around stylesheet.css.xml to allow it to be loaded via docbook-xsl's
3+
generate.css.header parameter.
4+
-->
5+
<!DOCTYPEstyle [
6+
<!ENTITYcss SYSTEM"stylesheet.css">
7+
]>
8+
<style>&css;</style>

‎doc/src/sgml/stylesheet.xsl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,6 @@
1717
<xsl:paramname="chunk.quietly"select="1"></xsl:param>
1818
<xsl:paramname="admon.style"></xsl:param><!-- handled by CSS stylesheet-->
1919

20-
<xsl:paramname="website.stylesheet"select="0"/>
21-
22-
<xsl:paramname="html.stylesheet">
23-
<xsl:choose>
24-
<xsl:whentest="$website.stylesheet = 0">stylesheet.css</xsl:when>
25-
<xsl:otherwise>
26-
https://www.postgresql.org/media/css/docs-complete.css
27-
</xsl:otherwise>
28-
</xsl:choose>
29-
</xsl:param>
30-
3120

3221
<!-- copy images to the output directory, so the output is self contained-->
3322
<xsl:templatematch="imageobject">

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp