Re: Release Notes Archive Patch - Mailing list pgsql-www

From Jonathan S. Katz
Subject Re: Release Notes Archive Patch
Date
Msg-id 364b776c-db88-c618-8d77-9a8bfd07d08e@postgresql.org
Whole thread Raw
In response to Re: Release Notes Archive Patch  ("Jonathan S. Katz" <jkatz@postgresql.org>)
List pgsql-www
On 2/13/19 2:34 PM, Jonathan S. Katz wrote:
> On 2/13/19 2:10 PM, Andres Freund wrote:
>> Hi,
>>
>> On February 13, 2019 8:03:03 PM GMT+01:00, "Jonathan S. Katz" <jkatz@postgresql.org> wrote:
>>>> I'm quite pissed at how haphazardly this was done.
>>>
>>> We had discussion on this for months, and after some idling, we
>>> proposed
>>> a solution and worked through it quickly. Sometimes you just need to
>>> rip
>>> the band-aid off.
>>
>> But even leaving that aside, nothing, absolutely nothing, prevented putting the web piece into place before breaking
things.
>
> I don't disagree with the above point. With that said, we are working to
> get the web piece up prior to the majority of the links going 404.
>
> I will go to work on a patch for current (which could be similar to
> "devel") and see if I can have that ready. I will do it as a separate
> patch from the one upthread.

This turned out to be not so bad, please see attached.

Here's the way it works:

- If you are viewing release notes in documentation prior to 9.4, do nothing
- If you are viewing the release notes in documentation for 9.4 and
above and you are viewing the release notes in your version (e.g. 9.4.8
in 9.4), do nothing
- If you are viewing the release notes in docs for 9.4+ and you are
viewing a "mismatched" version (e.g. /docs/10/release-9-6-4.html),
permanent redirect (301) to the proper version (e.g.
/docs/9.6/release-6-4.html)

It accounts for version numbering changes and all the fun

Notes:

- Tested in multiple scenarios, also dealing with different versioning
number permutations as well (e.g. release-10.html, release-10-1.html,
release-9-6.html, release-9-6-1.html)
- Tested with current. I did not test with devel as I do not have
"devel" docs set up on my local. However, I am going to work on setting
that up
- Given docs on the site go back to 7.2, there is a stop that says if
you are viewing a release note older than 7.2, then view the releases
notes in 7.2

This can be pushed independently of the previous patch as it redirects
users to existing documentation.

Feedback welcome. Thanks,

Jonathan

Attachment

pgsql-www by date:

Previous
From: "Jonathan S. Katz"
Date:
Subject: Re: Release Notes Archive Patch
Next
From: Justin
Date:
Subject: wiki editor Request