]> granicus.if.org Git - python/commitdiff
Fix broken `Show Source` links on documentation pages (GH-3113) (GH-3128)
authorMariatta <Mariatta@users.noreply.github.com>
Fri, 18 Aug 2017 13:22:32 +0000 (06:22 -0700)
committerGitHub <noreply@github.com>
Fri, 18 Aug 2017 13:22:32 +0000 (06:22 -0700)
The `Show Source` was broken because of a change made in sphinx 1.5.1
In Sphinx 1.4.9, the sourcename was "index.txt".
In Sphinx 1.5.1+, it is now "index.rst.txt".

(cherry picked from commit b9ff498793611d1c6a9b99df464812931a1e2d69)

Doc/tools/templates/layout.html

index cc16ae446ff91b1ace703d0be34ae77275cca8f9..8d6d3e5bd1193b1eed3d4ba79341e655c75df735 100644 (file)
@@ -46,7 +46,7 @@
 <h3>{{ _('This Page') }}</h3>
 <ul class="this-page-menu">
   <li><a href="{{ pathto('bugs') }}">{% trans %}Report a Bug{% endtrans %}</a></li>
-  <li><a href="https://github.com/python/cpython/blob/{{ version }}/Doc/{{ sourcename|replace('txt', 'rst') }}"
+  <li><a href="https://github.com/python/cpython/blob/{{ version }}/Doc/{{ sourcename|replace('.rst.txt', '.rst') }}"
          rel="nofollow">{% trans %}Show Source{% endtrans %}</a>
   </li>
 </ul>