]> granicus.if.org Git - python/commitdiff
bpo-28929: Link the documentation to its source file on GitHub (#38)
authorMariatta <Mariatta@users.noreply.github.com>
Sun, 12 Feb 2017 21:07:33 +0000 (13:07 -0800)
committerGitHub <noreply@github.com>
Sun, 12 Feb 2017 21:07:33 +0000 (13:07 -0800)
Change the documentation's `Show Source` link on the left menu
to GitHub source file.

Doc/tools/templates/layout.html

index c48754f0bcfab356cf9c8fd755d750a62fe5ffb9..acf4f33de31441e174c864815b04d8c05a8766c5 100644 (file)
@@ -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 %}