Commit 8efb0bc5 authored by Magnus Hagander's avatar Magnus Hagander

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.
parent 2502f459
...@@ -89,6 +89,9 @@ man-stamp: stylesheet-man.xsl postgres.xml ...@@ -89,6 +89,9 @@ man-stamp: stylesheet-man.xsl postgres.xml
.PHONY: draft .PHONY: draft
JADE.html.call = $(JADE) $(JADEFLAGS) $(SPFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t sgml -i output-html 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). # The draft target creates HTML output in draft mode, without index (for faster build).
draft: postgres.sgml $(ALMOSTALLSGML) stylesheet.dsl draft: postgres.sgml $(ALMOSTALLSGML) stylesheet.dsl
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<!-- (applicable to all output formats) --> <!-- (applicable to all output formats) -->
(define draft-mode #f) (define draft-mode #f)
(define website-stylesheet #f)
(define pgsql-docs-list "pgsql-docs@postgresql.org") (define pgsql-docs-list "pgsql-docs@postgresql.org")
...@@ -190,7 +191,7 @@ ...@@ -190,7 +191,7 @@
(define %root-filename% "index") (define %root-filename% "index")
(define %link-mailto-url% (string-append "mailto:" pgsql-docs-list)) (define %link-mailto-url% (string-append "mailto:" pgsql-docs-list))
(define %use-id-as-filename% #t) (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 %graphic-default-extension% "gif")
(define %gentext-nav-use-ff% #t) (define %gentext-nav-use-ff% #t)
(define %body-attr% '()) (define %body-attr% '())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment