summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMariatta <Mariatta@users.noreply.github.com>2017-02-12 21:07:33 (GMT)
committerGitHub <noreply@github.com>2017-02-12 21:07:33 (GMT)
commite15259c2dfef58df5f7cfa2305811a00c05e0353 (patch)
treebd80db8886bce58b002264c12dd13eb9a9f4034b /Doc
parent52b8c5591b7523111b90a8a960d018d284f5a81a (diff)
downloadcpython-e15259c2dfef58df5f7cfa2305811a00c05e0353.zip
cpython-e15259c2dfef58df5f7cfa2305811a00c05e0353.tar.gz
cpython-e15259c2dfef58df5f7cfa2305811a00c05e0353.tar.bz2
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.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/tools/templates/layout.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/tools/templates/layout.html b/Doc/tools/templates/layout.html
index c48754f..acf4f33 100644
--- a/Doc/tools/templates/layout.html
+++ b/Doc/tools/templates/layout.html
@@ -45,8 +45,9 @@
<h3>{{ _('This Page') }}</h3>
<ul class="this-page-menu">
<li><a href="{{ pathto('bugs') }}">{% trans %}Report a Bug{% endtrans %}</a></li>
- <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
- rel="nofollow">{% trans %}Show Source{% endtrans %}</a></li>
+ <li><a href="https://github.com/python/cpython/blob/{{ version }}/Doc/{{ sourcename|replace('txt', 'rst') }}"
+ rel="nofollow">{% trans %}Show Source{% endtrans %}</a>
+ </li>
</ul>
{%- endif %}
{% endblock %}