Skip to content

Commit e15259c

Browse files
authored
bpo-28929: Link the documentation to its source file on GitHub (#38)
Change the documentation's `Show Source` link on the left menu to GitHub source file.
1 parent 52b8c55 commit e15259c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/tools/templates/layout.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@
4545
<h3>{{ _('This Page') }}</h3>
4646
<ul class="this-page-menu">
4747
<li><a href="{{ pathto('bugs') }}">{% trans %}Report a Bug{% endtrans %}</a></li>
48-
<li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
49-
rel="nofollow">{% trans %}Show Source{% endtrans %}</a></li>
48+
<li><a href="https://github.com/python/cpython/blob/{{ version }}/Doc/{{ sourcename|replace('txt', 'rst') }}"
49+
rel="nofollow">{% trans %}Show Source{% endtrans %}</a>
50+
</li>
5051
</ul>
5152
{%- endif %}
5253
{% endblock %}

0 commit comments

Comments
 (0)