diff options
author | Magnus Hagander <magnus@hagander.net> | 2012-02-25 15:13:12 +0100 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2012-03-02 12:31:21 +0100 |
commit | 8efb0bc57eb350bd991fd32c96e38a13bfe7f120 (patch) | |
tree | e45579c666579b5b99108126196e59844aa660a6 /doc/src | |
parent | 2502f45979fca76a6b19a07c98d7a41737a3dc7b (diff) | |
download | postgresql-8efb0bc57eb350bd991fd32c96e38a13bfe7f120.tar.gz postgresql-8efb0bc57eb350bd991fd32c96e38a13bfe7f120.zip |
Add a rule to optionally build docs with the stylesheet from the website
For those of us who prefer the formatting of the docs using the
website stylesheets. Use "make STYLE=website draft" (for example) to use.
The stylesheet itself is referenced directly to the website, so there
is currently no copy of it stored in the source repository. Thus, docs
built with it will only look correct if the browser can access the website
when viewing them.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/Makefile | 3 | ||||
-rw-r--r-- | doc/src/sgml/stylesheet.dsl | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index e6c8a49df87..19e640b5d25 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -89,6 +89,9 @@ man-stamp: stylesheet-man.xsl postgres.xml .PHONY: draft JADE.html.call = $(JADE) $(JADEFLAGS) $(SPFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t sgml -i output-html +ifeq ($(STYLE),website) +JADE.html.call += -V website-stylesheet +endif # The draft target creates HTML output in draft mode, without index (for faster build). draft: postgres.sgml $(ALMOSTALLSGML) stylesheet.dsl diff --git a/doc/src/sgml/stylesheet.dsl b/doc/src/sgml/stylesheet.dsl index 232fa58e516..41796430850 100644 --- a/doc/src/sgml/stylesheet.dsl +++ b/doc/src/sgml/stylesheet.dsl @@ -29,6 +29,7 @@ <!-- (applicable to all output formats) --> (define draft-mode #f) +(define website-stylesheet #f) (define pgsql-docs-list "pgsql-docs@postgresql.org") @@ -190,7 +191,7 @@ (define %root-filename% "index") (define %link-mailto-url% (string-append "mailto:" pgsql-docs-list)) (define %use-id-as-filename% #t) -(define %stylesheet% "stylesheet.css") +(define %stylesheet% (if website-stylesheet "http://www.postgresql.org/media/css/docs.css" "stylesheet.css")) (define %graphic-default-extension% "gif") (define %gentext-nav-use-ff% #t) (define %body-attr% '()) |