Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 317906f

Browse files
Recreate website's formatting for "website" doc builds.
The stylesheets used for the HTML documentation rendered on postgresql.org have shifted, and no longer matched what was expected by "make STYLE=website html" builds performed locally. Local doc builds did not reflect other aspects of the website, including font and margins. This patch updates the references to use the current set of stylesheets that are used by the documentation on postgresql.org. This also wraps the documentation preview in a HTML container so it can keep the content within similar margins to those found on the website. The documentation on building the docs is updated to reflect this change, and to let the documentation builder know that an external network connection is required to properly preview documentation built with "make STYLE=website html" (which was true prior to this patch too, but not mentioned). Author: Jonathan Katz Reported-By: Tom Lane Discussion: https://postgr.es/m/1375.1581446233@sss.pgh.pa.us
1 parent 751c63c commit 317906f

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

doc/src/sgml/docguide.sgml

+7
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,13 @@ checking for fop... fop
276276
<prompt>doc/src/sgml$ </prompt><userinput>make STYLE=website html</userinput>
277277
</screen>
278278
</para>
279+
280+
<para>
281+
If the <literal>STYLE=website</literal> option is used, the generated HTML
282+
files include references to stylesheets hosted on <ulink
283+
url="https://www.postgresql.org/docs/current/">postgresql.org</ulink> and
284+
require network access to view.
285+
</para>
279286
</sect2>
280287

281288
<sect2>

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

+8
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
<xsl:param name="link.mailto.url">pgsql-docs@lists.postgresql.org</xsl:param>
1919
<xsl:param name="toc.max.depth">2</xsl:param>
2020

21+
<!--
22+
The below allows the stylesheets provided by the website to be applied fully
23+
to the generated HTML.
24+
-->
25+
<xsl:template name="body.attributes">
26+
<xsl:attribute name="id">docContent</xsl:attribute>
27+
<xsl:attribute name="class">container-fluid col-10</xsl:attribute>
28+
</xsl:template>
2129

2230
<!-- Change display of some elements -->
2331

doc/src/sgml/stylesheet.xsl

+6-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@
2323
<xsl:param name="html.stylesheet">
2424
<xsl:choose>
2525
<xsl:when test="$website.stylesheet = 0">stylesheet.css</xsl:when>
26-
<xsl:otherwise>https://www.postgresql.org/media/css/docs.css</xsl:otherwise>
26+
<xsl:otherwise>
27+
https://www.postgresql.org/media/css/fontawesome.css
28+
https://www.postgresql.org/media/css/bootstrap.min.css
29+
https://www.postgresql.org/media/css/main.css
30+
https://www.postgresql.org/media/css/normalize.css
31+
</xsl:otherwise>
2732
</xsl:choose>
2833
</xsl:param>
2934

0 commit comments

Comments
 (0)