From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL WWW <pgsql-www(at)postgresql(dot)org> |
Subject: | Re: Get rid of /static/ in doc urls? |
Date: | 2018-11-05 14:31:47 |
Message-ID: | CABUevEwBR9xZ8G4MkH-HxFfA5qf_r8k1rT-L3f1KGWfgQ8P5uA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-www |
On Mon, Nov 5, 2018 at 3:13 PM Jonathan S. Katz <jkatz(at)postgresql(dot)org>
wrote:
> On 11/5/18 7:43 AM, Magnus Hagander wrote:
> >
> >
> > On Sun, Nov 4, 2018 at 5:38 PM Jonathan S. Katz <jkatz(at)postgresql(dot)org
> > <mailto:jkatz(at)postgresql(dot)org>> wrote:
> >
> > 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"
> >
> >
> > One of the redirects is set as permanent and the other one
> > non-permanent. Granted it's just a change of a previous redirect, but is
> > there any reason to have different kinds of redirect e.g. for root page
> > vs other pages?
>
> I think given the nature of the change, it could be a permanent
> redirect. I've adjusted this in the code and reattached.
>
> One could also argue that the temp redirect triggered by this line:
>
> if ver >= 10 and version.find('.') > -1:
> # Version 10 and up, but specified as 10.0 / 11.0 etc, so redirect
> back without the
> # decimal.
> return HttpResponseRedirect("/docs/{0}/{1}.html".format(int(ver),
> filename))
>
> could be made a permanent redirect too, given the change of the number
> scheme. Thoughts?
>
Yes, I think it should be. Also makes it consistent.
With that change as well, lgtm.
> 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.
> >
> >
> > I notice there are still some references to /interactive/ in old
> > presskits. I suggest fixing that at the same time.
>
> Yeah...wow. And some where there up until 9.6 too. I also caught a few
> more statics in the process. Attached.
>
:)
Haven't reviewed in detail, but I'm sure this part is OK.
--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>
From | Date | Subject | |
---|---|---|---|
Next Message | Jonathan S. Katz | 2018-11-05 15:37:37 | Re: Get rid of /static/ in doc urls? |
Previous Message | Jonathan S. Katz | 2018-11-05 14:13:10 | Re: Get rid of /static/ in doc urls? |