Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9UST-0000MD-OA for pgsql-www@arkaria.postgresql.org; Mon, 17 Jan 2022 16:02:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n9USR-0001Hc-PV for pgsql-www@arkaria.postgresql.org; Mon, 17 Jan 2022 16:02:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9USR-0001HT-G6 for pgsql-www@lists.postgresql.org; Mon, 17 Jan 2022 16:02:11 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n9USO-0004YQ-Ib for pgsql-www@lists.postgresql.org; Mon, 17 Jan 2022 16:02:10 +0000 Received: by mail-lf1-x130.google.com with SMTP id m3so45342114lfu.0 for ; Mon, 17 Jan 2022 08:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagander-net.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sDi1qYXWkrp148owWg7a4k9uJI+OW+fziADhq/l8ewA=; b=ZNIArh1eU9Qa1Ms8ardPhTyc9C7wTz985A6Z+BSpoheCC6HJJVlzfOB/6rWhPmiXQZ KhAYRflGj6sqmuo1z2KhbaWHx+OcxvB3f9rR4cy+OBZpH6nKc0VmNmCp0OgmbL/Qvxmk uhvV6M1UybH8aIJWG9nb1sx2lcY4+8ETphFdloNCqKhSxmcMb9VWPiH+YTtzIbihd7pQ SGdJUe1n5CQENdk3IZzSaeohHgvofd4cHVXBKxz2ULN2jckjdZ2d5RH8THDl6eGeq0Un lpxHUgYfZk61X/WedhimQTwfOKDQO8DTLnUXGyLtsDjNoW97Wk133uTw6v6D6dz7pF7p Hifw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sDi1qYXWkrp148owWg7a4k9uJI+OW+fziADhq/l8ewA=; b=QuiStUJOH1DlLElkzn/e/5cmnm1P/85H1poDtuBuFkNeWfR25VQdHSyYjVCBBuFL7b oZKsoEVITn2Hgm9yyiFcGMWB5GRsJjrelNfycBU2L0GdVXwtFz1jMPYuYZZFDqjyZp2R EeH3S39a3Ug2m7sdn04cVEQoGx16+HywSmqi7omUMuo6SgTeoqrQnPYuaMiP77XIUmCM uM7UzU0BaIm5ROvTW5Vn7DFT5KYG9Hw+zxtn0QgOFNAoG3K5zz+8NkOddFPCYvZtkt76 313Wv+AM35tW552V8brRFPIVowt0dalKs0OHsf6vwZbYysaa2OpmoIiQ7H56MDnpxJ69 +BEQ== X-Gm-Message-State: AOAM533yPMCRt8pd+JXAEfhwX4RtrgNb8j2i7GW4Q8MDAqzh1hu6aEY/ gxcywPa2FVjAg02C8yYPI4w/G16h94kuVUTJ03D/fA== X-Google-Smtp-Source: ABdhPJxuwKDq8+dIEWsu19NpSTJRdpJa9CyfVPEM8EqeQsbxU2lnUJZV4yhOmmREB5nIJ2A3nUXyeEXTW/UDjZK1t8M= X-Received: by 2002:a19:600f:: with SMTP id u15mr16382789lfb.633.1642435327526; Mon, 17 Jan 2022 08:02:07 -0800 (PST) MIME-Version: 1.0 References: <20211107163140.rnqihhpwrc5vwt2l@nixos> <53D92024-85B0-4226-82A4-3A27CFA7880B@yesql.se> <31a6c019-83ef-2d12-b9c7-3829ee7977bf@postgresql.org> <835f0d02-cc23-d333-fb16-ef370ca2e68b@postgresql.org> In-Reply-To: <835f0d02-cc23-d333-fb16-ef370ca2e68b@postgresql.org> From: Magnus Hagander Date: Mon, 17 Jan 2022 17:01:56 +0100 Message-ID: Subject: Re: [PATCH] Change text direction of documentation pages To: "Jonathan S. Katz" Cc: Daniel Gustafsson , Nils , pgsql-www@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Jan 2, 2022 at 11:03 PM Jonathan S. Katz wrote: > > 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.: > > - PostgreSQL: Documentation: {{page.display_version}}: > {{page.title}} > + {{page.title}} — PostgreSQL {{page.display_version}} > Documentation > > 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. You're talking about changing just the here right, and keeping it in the <hx> tags? > 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 — > Chapter — PostgreSQL NN Documentation", with title/chapter dropped > if they're not present. > > Thoughts? Is this perhaps something that should be implemented in the docs builder step for all HTML rather than do it one way there and then try to change it for the website? I do like the idea in general. But that might be a better place? (Note that I have no idea how to actually do that, but I assume it can be done) -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/