Commits

Georg Brandl  committed 75ba556

Add sidebarsourcelink block.

  • Participants
  • Parent commits e497c88

Comments (0)

Files changed (2)

File doc/templating.rst

 `sidebarrel`
     The relation links (previous, next document) within the sidebar.
 
+`sidebarsourcelink`
+    The "Show source" link within the sidebar (normally only shown if this is
+    enabled by :confval:`html_show_sourcelink`).
+
 `sidebarsearch`
     The search box within the sidebar.  Override this if you want to place some
     content at the bottom of the sidebar.

File sphinx/templates/layout.html

             <p class="topless"><a href="{{ next.link|e }}" title="{{ _('next chapter') }}">{{ next.title }}</a></p>
           {%- endif %}
           {%- endblock %}
+          {%- block sidebarsourcelink %}
           {%- if show_source and has_source %}
             <h3>{{ _('This Page') }}</h3>
             <ul class="this-page-menu">
               <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}">{{ _('Show Source') }}</a></li>
             </ul>
           {%- endif %}
+          {%- endblock %}
           {%- if customsidebar %}
           {{ rendertemplate(customsidebar) }}
           {%- endif %}