https://github.com/python/cpython/commit/4f10b93d1b2f887b42ad59168a9fcbe75bdaaf87
commit: 4f10b93d1b2f887b42ad59168a9fcbe75bdaaf87
branch: main
author: Adam Turner <[email protected]>
committer: AA-Turner <[email protected]>
date: 2025-04-15T23:27:01+01:00
summary:
Docs: Synchronise ``indexsidebar.html`` with docsbuild-scripts (#132567)
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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]