Re: [PATCH] Change text direction of documentation pages

From: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Nils <nils(at)nilsand(dot)re>, pgsql-www(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Change text direction of documentation pages
Date: 2022-01-02 22:03:41
Message-ID: 835f0d02-cc23-d333-fb16-ef370ca2e68b@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On 11/29/21 4:16 AM, Daniel Gustafsson wrote:

>> Overall OK with the approach, but would like to see how it renders.
>
> I don't have a local pgweb setup for now, so feel free to pick it up and play
> with it if you have time.

Fast forward to the future, I went and played around with the suggested
patch, i.e.:

- <title>PostgreSQL: Documentation: {{page.display_version}}:
{{page.title}}</title>
+ <title>{{page.title}} &mdash; PostgreSQL {{page.display_version}}
Documentation</title>

It looks OK...but I question having the chapter/section prefix in the
title, i.e.:

"7.2 Table Expressions -- PostgreSQL 10 Documentation"

(yes, I need to update my local copy of the docs).

I think:

"Table Expressions -- PostgreSQL 10 Documentation"

would be better, esp. from the SEO perspective. This would also mean
adjusting our Open Graph tags to account for it from a display
perspective as well. And writing a function to strip out the prefix.

However, this opens up a few things:

1. On the main doc page, it now reads something like "PostgreSQL 13.5
Documentation - PostgreSQL 13 Documentation." That should be simple
enough to adjust though.

2. On this page:

https://www.postgresql.org/docs/10/typeconv-overview.html

the title would then read "Overview -- PostgreSQL 10 Documentation",
which also seems off. So perhaps the general algorithm becomes:

"Page Title -- Chapter Name -- PostgreSQL NN Documentation"

which would make that:

"Overview -- Type Conversation -- PostgreSQL 10 Documentation"

So, I think this is a little more work. I would propose this:

- In the doc loader script, extract the "chapter" name out of the
provided information and store it in DocPage OR dynamically extract it
while rendering a documentation page. I'm thinking the latter for this.

- Have a "page title" in the documentation available without the
chapter/section prefix

- Set the page title to be something like "Title w/o Prefix &mdash;
Chapter &mdash; PostgreSQL NN Documentation", with title/chapter dropped
if they're not present.

Thoughts?

Thanks,

Jonathan

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Jon Jensen 2022-01-03 15:46:57 Editor privileges for user Jonjensen
Previous Message Magnus Hagander 2021-12-20 13:29:39 Re: Account creation / password reset error