Skip to content

Commit f66c81f

Browse files
authored
[backport to 3.6] bpo-28929: Link the documentation to its source file on GitHub (#37)
* 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. (cherry picked from commit 23bafa2) * remove if statement
1 parent 308f789 commit f66c81f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Doc/tools/templates/customsourcelink.html

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
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+
<a href="https://github.com/python/cpython/blob/{{ version }}/Doc/{{ sourcename|replace('txt', 'rst') }}"
8+
rel="nofollow">{{ _('Show Source') }}
9+
</a>
10+
</li>
811
</ul>
912
</div>
1013
{%- endif %}

0 commit comments

Comments
 (0)