diff options
author | Pauli Virtanen <pav@iki.fi> | 2009-02-27 22:27:14 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2009-02-27 22:27:14 +0000 |
commit | 69d6473d35cb15a5832591bda424277df0a63bf3 (patch) | |
tree | d5693ade6ffda9499d4f081ab0e0516b065d6121 | |
parent | 9e9785907dd670f44d27ecfc98464c882dc216d8 (diff) | |
download | numpy-69d6473d35cb15a5832591bda424277df0a63bf3.tar.gz |
docs: move edit link to the sidebar, and show it for all pages
-rw-r--r-- | doc/source/_templates/layout.html | 13 | ||||
-rw-r--r-- | doc/source/conf.py | 3 |
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 # ----------------------------------------------------------------------------- |