Re: Get rid of /static/ in doc urls?

From: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
To: Andres Freund <andres(at)anarazel(dot)de>, pgsql-www(at)postgresql(dot)org
Subject: Re: Get rid of /static/ in doc urls?
Date: 2018-11-04 16:38:20
Message-ID: 4aecda2f-4fd9-babf-08f3-3e7a5baca7df@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On 10/19/18 6:30 PM, Jonathan S. Katz wrote:
> On 10/19/18 6:26 PM, Andres Freund wrote:
>> Hi,
>>
>> For reasons I can't quite understand the /static/ in the docs URL bugs
>> me, now that we don't have /interactive/ anymore. Could we just shorten
>> that out of the URL? The redirects shouldn't be problematic...
>>
>
> Yeah, that makes a lot of sense.
>
>> I think as long as we issue the right redirects, search engines
>> shouldn't be troubled by this, but my knowledge about this kind of stuff
>> is severely outdated.
>>
>
> We would need permanent redirects, but those are not hard to set up,
> especially in Django (or at the webserver level if we wanted to be super
> efficient).
>
> AFAIK this should be fairly trivial (and a good idea to do) so I'd +1
> the change. I think, again, it's a matter if we want to apply it at the
> Django or webserver level.

Attached are a series of patches that accomplishes safely removing
`/static/` in the doc URLs.

The first patch does exactly that: whenever someone tries to browse to a
docs URL, e.g. "/docs/current/static/index.html" it will permanently
redirect the user to "/docs/current/index.html"

The second patch updates all the references on the site to use the new
format. The pith of it is in the presskits; I did opt to update those as
the less references we have to the old URL scheme, the better.

Contrary to some earlier comments about handling this in varnish, etc.
after reviewing some of the logic surrounding the docs, it is better we
handle this on the Django level.

Please let me know what you think.

Thanks,

Jonathan

Attachment Content-Type Size
0001-Remove-.-static-.-from-doc-URLs.patch text/plain 4.7 KB
0002-Remove-references-to-the-.-static-.-path-to-document.patch text/plain 165.1 KB

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Tatsuo Ishii 2018-11-05 02:20:36 Re: Code of Conduct plan,Re: Code of Conduct plan,Re: Code of Conduct plan,Re: Code of Conduct plan
Previous Message Jonathan S. Katz 2018-11-04 15:55:53 Re: Redhat Post Installation instructions misleading