Re: Duplicating website's formatting in local doc builds - Mailing list pgsql-docs

From Jonathan S. Katz
Subject Re: Duplicating website's formatting in local doc builds
Date
Msg-id 4b44c4ec-a678-6586-fbb0-efc3299af203@postgresql.org
Whole thread Raw
In response to Re: Duplicating website's formatting in local doc builds  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Duplicating website's formatting in local doc builds  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-docs
On 2/11/20 2:32 PM, Tom Lane wrote:
> "Jonathan S. Katz" <jkatz@postgresql.org> writes:
>> On 2/11/20 1:37 PM, Tom Lane wrote:
>>> I also wonder why duplicating the website's style isn't the default.
>>> Doesn't seem like having authors optimize for some other style is
>>> what we really want.
>
>> Oh, and specifically for this, my guess is because it requires one to
>> make a call over a network to load the stylesheet. :)
>
> Surely we could provide directions about how to store that locally.

I have a little doubt about that, but per mention in the original email,
it means storing a lot more stylesheets and ones that may change with
more frequency than the project. It may not be too much of an issue, but
I do want to note that. I'm somewhat ambivalent myself, but my
preference is to have the single source of truth.

Anyway, attached is a first attempt at a patch. I tried a few different
variations but in my quick review of it, I could not figure out how to
make a XSLT respect having multiple stylesheets (likely due to my lack
of familiarity with XSLT).

This just swaps out the link. A better approach would be to find a way
to include multiple CSS stylesheets. After searching over a bunch of
different terms, I could not figure out how to get to this result, but
as mentioned, I'm close to clueless on writing XSLT at this point.

Another way we could get to the desired result add something to pgweb
similar to the old "docs.css" that is being referenced that combines the
multiple stylesheets into one. It's a bit of an anti-pattern in modern
web, so I'm not thrilled to go down that route.

Jonathan

Attachment

pgsql-docs by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Duplicating website's formatting in local doc builds
Next
From: Peter Geoghegan
Date:
Subject: Re: Duplicating website's formatting in local doc builds