https://github.com/python/cpython/commit/2a1a337d2802bcf8f38936ed96f3526056c3c5dd
commit: 2a1a337d2802bcf8f38936ed96f3526056c3c5dd
branch: 3.13
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: AA-Turner <9087854+aa-tur...@users.noreply.github.com>
date: 2025-04-15T23:42:27+01:00
summary:

[3.13] Docs: Synchronise ``indexsidebar.html`` with docsbuild-scripts 
(GH-132567) (#132573)

Docs: Synchronise ``indexsidebar.html`` with docsbuild-scripts (GH-132567)
(cherry picked from commit 4f10b93d1b2f887b42ad59168a9fcbe75bdaaf87)

Co-authored-by: Adam Turner <9087854+aa-tur...@users.noreply.github.com>

files:
A Doc/tools/templates/_docs_by_version.html
M Doc/tools/templates/indexsidebar.html

diff --git a/Doc/tools/templates/_docs_by_version.html 
b/Doc/tools/templates/_docs_by_version.html
new file mode 100644
index 00000000000000..1a84cfbf229207
--- /dev/null
+++ b/Doc/tools/templates/_docs_by_version.html
@@ -0,0 +1,11 @@
+{#
+This file is only used in indexsidebar.html, where it is included in the docs
+by version list. For non-end-of-life branches, build_docs.py overwrites this
+list with the full list of versions.
+
+Keep the following two files synchronised:
+* cpython/Doc/tools/templates/_docs_by_version.html
+* docsbuild-scripts/templates/_docs_by_version.html
+#}
+<li><a href="https://docs.python.org/3/";>{% trans %}Stable{% endtrans 
%}</a></li>
+<li><a href="https://docs.python.org/dev/";>{% trans %}In development{% 
endtrans %}</a></li>
diff --git a/Doc/tools/templates/indexsidebar.html 
b/Doc/tools/templates/indexsidebar.html
index 5986204256f4bc..eea29e2449a9cf 100644
--- a/Doc/tools/templates/indexsidebar.html
+++ b/Doc/tools/templates/indexsidebar.html
@@ -2,11 +2,10 @@ <h3>{% trans %}Download{% endtrans %}</h3>
 <p><a href="{{ pathto('download') }}">{% trans %}Download these documents{% 
endtrans %}</a></p>
 <h3>{% trans %}Docs by version{% endtrans %}</h3>
 <ul>
-  <li><a href="https://docs.python.org/";>{% trans %}Stable{% endtrans 
%}</a></li>
-  <li><a href="https://docs.python.org/dev/";>{% trans %}In development{% 
endtrans %}</a></li>
+  {# _docs_by_version.html is overwritten by build_docs.py for non-EOL 
versions #}
+  {% include "_docs_by_version.html" without context %}
   <li><a href="https://www.python.org/doc/versions/";>{% trans %}All versions{% 
endtrans %}</a></li>
 </ul>
-
 <h3>{% trans %}Other resources{% endtrans %}</h3>
 <ul>
   {# XXX: many of these should probably be merged in the main docs #}

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to