diff --git a/doc/templating.rst b/doc/templating.rst index fa6f268265..ff4bdd5144 100644 --- a/doc/templating.rst +++ b/doc/templating.rst @@ -135,6 +135,10 @@ The following blocks exist in the ``layout`` template: `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. diff --git a/sphinx/templates/layout.html b/sphinx/templates/layout.html index bd1b285361..083fea1d33 100644 --- a/sphinx/templates/layout.html +++ b/sphinx/templates/layout.html @@ -51,12 +51,14 @@

{{ next.title }}

{%- endif %} {%- endblock %} + {%- block sidebarsourcelink %} {%- if show_source and has_source %}

{{ _('This Page') }}

{%- endif %} + {%- endblock %} {%- if customsidebar %} {{ rendertemplate(customsidebar) }} {%- endif %}