diff options
author | Dag Wieers <dag@wieers.com> | 2018-02-24 03:57:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-24 03:57:37 +0100 |
commit | ba370b178d267bb5976a8da925be482ade7b7f3b (patch) | |
tree | 929df89a6e8c67ec549e16a3cae1f474ee678201 /docs/docsite/_themes/sphinx_rtd_theme/breadcrumbs.html | |
parent | fde4cc62197e4680d7b2a2c85d96d8d01a33853b (diff) | |
download | ansible-ba370b178d267bb5976a8da925be482ade7b7f3b.tar.gz |
docsite: Add 'Edit on GitHub' for module docs (#36667)
This is something I always wanted, a 'Edit on GitHub' button for module
documentation.
I also removed the additional statement in the footer with instructions
on how to edit the module documentation.
PS The links go directly into the GitHub file editor now !
Diffstat (limited to 'docs/docsite/_themes/sphinx_rtd_theme/breadcrumbs.html')
-rw-r--r-- | docs/docsite/_themes/sphinx_rtd_theme/breadcrumbs.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/docsite/_themes/sphinx_rtd_theme/breadcrumbs.html b/docs/docsite/_themes/sphinx_rtd_theme/breadcrumbs.html index c052c0bde1..7e901ab98e 100644 --- a/docs/docsite/_themes/sphinx_rtd_theme/breadcrumbs.html +++ b/docs/docsite/_themes/sphinx_rtd_theme/breadcrumbs.html @@ -1,9 +1,13 @@ <ul class="wy-breadcrumbs"> <li><a href="{{ pathto(master_doc) }}">Docs</a> »</li> <li><a href="">{{ title }}</a></li> - {% if not pagename.endswith('_module') and (not 'list_of' in pagename) and (not 'category' in pagename) %} + {% if pagename.endswith('_module') %} <li class="wy-breadcrumbs-aside"> - <a href="https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/{{ pagename }}.rst" class="icon icon-github"> Edit on GitHub</a> + <a href="https://github.com/ansible/ansible/edit/devel/lib/ansible/modules/{{ meta.get('source', '') }}" class="icon icon-github"> Edit on GitHub</a> + </li> + {% elif (not 'list_of' in pagename) and (not 'category' in pagename) %} + <li class="wy-breadcrumbs-aside"> + <a href="https://github.com/ansible/ansible/edit/devel/docs/docsite/rst/{{ pagename }}.rst" class="icon icon-github"> Edit on GitHub</a> </li> {% endif %} </ul> |