summaryrefslogtreecommitdiff
path: root/sphinx/themes/basic/sourcelink.html
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-01-07 17:56:09 +0100
committerGeorg Brandl <georg@python.org>2010-01-07 17:56:09 +0100
commitcbfa4e8acfa7ec1b81dbac4afca8b498ef96569a (patch)
tree1e9354e3f8e01164bddf751f2a02858e1c2d2c77 /sphinx/themes/basic/sourcelink.html
parent6aaac900333341f58ca319ee0850e20af4214093 (diff)
downloadsphinx-cbfa4e8acfa7ec1b81dbac4afca8b498ef96569a.tar.gz
The ``html_sidebars`` config value can now contain patterns as keys, and the values can be lists that explicitly select which sidebar templates should be rendered.
That means that the builtin sidebar contents can be included only selectively.
Diffstat (limited to 'sphinx/themes/basic/sourcelink.html')
-rw-r--r--sphinx/themes/basic/sourcelink.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/sphinx/themes/basic/sourcelink.html b/sphinx/themes/basic/sourcelink.html
new file mode 100644
index 00000000..665e1272
--- /dev/null
+++ b/sphinx/themes/basic/sourcelink.html
@@ -0,0 +1,18 @@
+{#
+ basic/sourcelink.html
+ ~~~~~~~~~~~~~~~~~~~~~
+
+ Sphinx sidebar template: "show source" link.
+
+ :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+#}
+{%- block sidebarsourcelink %}
+{%- if show_source and has_source and sourcename %}
+ <h3>{{ _('This Page') }}</h3>
+ <ul class="this-page-menu">
+ <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
+ rel="nofollow">{{ _('Show Source') }}</a></li>
+ </ul>
+{%- endif %}
+{%- endblock %}