I've asked for this a few times before, but it seems others aren't as
keen on it as me :-) Personally, I find the docs easier to read when
formatted with the new website styles that Thom put together, and I
also like to see things the way they're going to look when they go up
there.

Attached patch makes it possible to say "make STYLE=website" for the
docs, which will then simply replace the stylesheet reference with one
that goes to fetch docs.css on the website. I'm not suggesting we
change the default or anything, just making it reasonably easy to get
it done for one-off builds.

I don't really speak the DSSSL naugage, so there might be a better way
of doing it..

Comments?

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile
index e6c8a49..19e640b 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 232fa58..4179643 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-d...@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%             '())
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to