From 55f23c4233b95955a3233284f9f0aa988457a7a7 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 28 Oct 2012 08:04:38 +0100 Subject: [PATCH] #8040: port versionswitcher patch to 2.6. --- Doc/Makefile | 2 +- Doc/tools/sphinxext/layout.html | 13 +++- Doc/tools/sphinxext/static/version_switch.js | 66 ++++++++++++++++++++ 3 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 Doc/tools/sphinxext/static/version_switch.js diff --git a/Doc/Makefile b/Doc/Makefile index f904e5fbead..5c17eed33e5 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -164,7 +164,7 @@ check: # for development releases: always build autobuild-dev: make update - make dist SPHINXOPTS='-A daily=1' + make dist SPHINXOPTS='-A daily=1 -A versionswitcher=1' # for stable releases: only build if not in pre-release stage (alpha, beta, rc) autobuild-stable: diff --git a/Doc/tools/sphinxext/layout.html b/Doc/tools/sphinxext/layout.html index a2561811305..4d9d4355fe1 100644 --- a/Doc/tools/sphinxext/layout.html +++ b/Doc/tools/sphinxext/layout.html @@ -2,17 +2,26 @@ {% block rootrellink %}
  • -
  • {{ shorttitle }}{{ reldelim1 }}
  • +
  • Python{{ reldelim1 }}
  • +
  • + {%- if versionswitcher is defined %} + {{ release }} + Documentation{{ reldelim1 }} + {%- else %} + {{ shorttitle }}{{ reldelim1 }} + {%- endif %} +
  • {% endblock %} {% block extrahead %} + {% if versionswitcher is defined and not embedded %}{% endif %} {{ super() }} {% endblock %} {% block footer %}