[Python-ideas] Adding "View Python 3 Documentation" to all Python 2 documentation URLs

Nick Coghlan ncoghlan at gmail.com
Thu Sep 7 18:51:34 EDT 2017


On 7 September 2017 at 12:24, Sebastian Krause <sebastian at realpath.org> wrote:
> Sebastian Krause <sebastian at realpath.org> wrote:
>> This is why if you search for "python 3 $module" in Google, you'll
>> never see a direct link to the 3.5 or 3.6 versions of the
>> documentation (because Google merges them with the generic
>> docs.python.org/3/), but you still results for versions 3.2, 3.3
>> etc. of the documentation (because the lack the canonical links).
>>
>> A very good step would be to also add this canoncial link to the
>> documentation versions 3.0-3.4, this will make docs.python.org/3.3/
>> etc. vanish from Google and probably rank the generic
>> docs.python.org/3/ higher than now.
>
> Here is Nick Coghlan's bpo issue which added these canonical links:
> https://bugs.python.org/issue26355 - looks like applying this to the
> older doc versions never happened in the end.

Right, as adding those will need to be handled through the web server
and/or by manually regenerating the docs with the additional HTML
headers - making the changes to the CPython repo won't achieve
anything, since the docs for those branches aren't automatically
regenerated anymore.

Another big task that could be undertaken is to start re-routing
unqualified deep links to Python 3 - the reason we still haven't done
that is because the tree layout is actually different (as per the
six.moves module), so it isn't a trivial rewrite rule the way the
current redirection into the Python 2 docs is. Given such a mapping,
it would also be possible to add the corresponding canonical URL
entries to the Python 2.7 documentation to merge their search ranking
in to the corresponding Python 3 pages.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list