Re: Duplicating website's formatting in local doc builds

From: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Docs <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Duplicating website's formatting in local doc builds
Date: 2020-02-11 20:49:53
Message-ID: dc3089b0-9c40-fc3b-bce1-7fcc16891dd1@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On 2/11/20 3:41 PM, Peter Geoghegan wrote:
> On Tue, Feb 11, 2020 at 11:40 AM Jonathan S. Katz <jkatz(at)postgresql(dot)org> wrote:
>> 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).
>
> I tried this patch out.

Thanks!

> The alignment is a little off, since the docs
> don't appear in the website's frame, and lack the website's header. It
> would be nice if the same margins appeared to the left and to the
> right.

Yup, that's a direct result of not having the Bootstrap base.

> But even still, it's a vast improvement.

Cool.

>>
> There are a couple of inconsistencies in the tables and diagrams that
> appear on this documentation page (on my local build that uses your
> patch):
>
> https://www.postgresql.org/docs/devel/storage-page-layout.html
>
> The tables look different, which isn't too bad. The "Figure 68.1. Page
> Layout" diagram is massive, though. IIRC was an issue that had to be
> addressed on the website a little after the introduction of images
> into the docs. It seems as if my local build of the docs needs that
> same fix.

Ditto on missing the Bootstrap base. The tables rely directly on that
base for the style an formatting. For the images, the CSS classes are:

"figure col-xl-8 col-lg-10 col-md-12"

"figure" is one of our custom defined classes, but the rest are
Bootstrap and are designed to size to the particular browser window
resolution.

(For the history of the figure sizing, it was two fixes:

1. One with the SVG generation to allow for it to scale (the "S" in SVG
:) and then
2. Applying the CSS classes shown above.

Without the CSS classes, the image will scale without limit)

Jonathan

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2020-02-11 21:51:09 Getting our tables to render better in PDF output
Previous Message Peter Geoghegan 2020-02-11 20:41:34 Re: Duplicating website's formatting in local doc builds