summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/source/_templates/layout.html13
-rw-r--r--doc/source/conf.py3
2 files changed, 13 insertions, 3 deletions
diff --git a/doc/source/_templates/layout.html b/doc/source/_templates/layout.html
index 5338fc6f6..27798878e 100644
--- a/doc/source/_templates/layout.html
+++ b/doc/source/_templates/layout.html
@@ -2,3 +2,16 @@
{% block rootrellink %}
<li><a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}</li>
{% endblock %}
+
+{% block sidebarsearch %}
+{%- if sourcename %}
+<ul class="this-page-menu">
+{%- if 'reference/generated' in sourcename %}
+ <li><a href="/numpy/docs/{{ sourcename.replace('reference/generated/', '').replace('.txt', '') |e }}">{{_('Edit page')}}</a></li>
+{%- else %}
+ <li><a href="/numpy/docs/numpy-docs/{{ sourcename.replace('.txt', '.rst') |e }}">{{_('Edit page')}}</a></li>
+{%- endif %}
+</ul>
+{%- endif %}
+{{ super() }}
+{% endblock %}
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 8203812d4..e5dac9023 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -207,9 +207,6 @@ intersphinx_mapping = {'http://docs.python.org/dev': None}
# If we want to do a phantom import from an XML file for all autodocs
phantom_import_file = 'dump.xml'
-# Edit links
-numpydoc_edit_link = '`Edit </numpy/docs/%(full_name)s/>`__'
-
# -----------------------------------------------------------------------------
# Coverage checker
# -----------------------------------------------------------------------------