Skip to content

Commit 23bafa2

Browse files
committed
bpo-28929: Link the documentation to its source file on GitHub
Change the documentation's `Show Source` link on the left menu to GitHub source file.
1 parent e7ffb99 commit 23bafa2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Doc/tools/templates/customsourcelink.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
<h3>{{ _('This Page') }}</h3>
44
<ul class="this-page-menu">
55
<li><a href="{{ pathto('bugs') }}">{% trans %}Report a Bug{% endtrans %}</a></li>
6-
<li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
7-
rel="nofollow">{{ _('Show Source') }}</a></li>
6+
<li>
7+
{% if version == "3.7" %}
8+
{% set version = 'master' %}
9+
{% endif %}
10+
<a href="https://github.com/python/cpython/blob/{{ version }}/Doc/{{ sourcename|replace('txt', 'rst') }}"
11+
rel="nofollow">{{ _('Show Source') }}
12+
</a>
13+
</li>
814
</ul>
915
</div>
1016
{%- endif %}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy