[docs] Add a version switcher to python docs site (issue 16331)

ezio.melotti at gmail.com ezio.melotti at gmail.com
Fri Oct 26 20:34:11 CEST 2012


http://bugs.python.org/review/16331/diff/6400/Doc/conf.py
File Doc/conf.py (right):

http://bugs.python.org/review/16331/diff/6400/Doc/conf.py#newcode72
Doc/conf.py:72: html_short_title = 'Documentation'
On 2012/10/26 19:53:25, yselivanov wrote:
> On 2012/10/26 19:48:52, ezio.melotti wrote:
> > I would leave this unchanged, in order to have the right title when
js is not
> > available.
> 
> Eric,
> 
> If JS is not available, then '''<span id="version_switcher">''' will
contain the
> release number, hence, for the user it will look like docs without
this patch
> applied.

Fair enough, assuming that this is true for all the places where
html_short_title was previously used (if there are more than one).

http://bugs.python.org/review/16331/diff/6400/Doc/tools/sphinxext/layout.html
File Doc/tools/sphinxext/layout.html (right):

http://bugs.python.org/review/16331/diff/6400/Doc/tools/sphinxext/layout.html#newcode7
Doc/tools/sphinxext/layout.html:7: <span id="version_switcher">{{
release }}</span>
On 2012/10/26 19:56:45, yselivanov wrote:
> On 2012/10/26 19:48:52, ezio.melotti wrote:
> > This should probably be wrapped in an {% if not embedded %}
> 
> Well, in the current patch it shouldn't be, as {{ shorttitle }} will
just
> display 'Documentation', and the <span> will display a release number.
 Together
> they look like they looked before the patch...

OK

http://bugs.python.org/review/16331/


More information about the docs mailing list