mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
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 !
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<li><a href="">{{ title }}</a></li>
|
||||
{% if not pagename.endswith('_module') and (not 'list_of' in pagename) and (not 'category' in pagename) %}
|
||||
<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/docs/docsite/rst/{{ pagename }}.rst" class="icon icon-github"> Edit on GitHub</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</script>
|
||||
|
||||
<p>
|
||||
Copyright © 2017 Red Hat, Inc.
|
||||
Copyright © 2018 Red Hat, Inc.
|
||||
<br>
|
||||
|
||||
{%- if last_updated %}
|
||||
@@ -30,6 +30,6 @@
|
||||
{%- endif %}
|
||||
</p>
|
||||
<p>
|
||||
Ansible docs are generated from <a href="https://github.com/ansible/ansible">GitHub sources</a> using <a href="http://sphinx-doc.org/">Sphinx</a> using a theme provided by <a href="http://readthedocs.org">Read the Docs</a>. {% if pagename.endswith("_module") %}Module documentation is not edited directly, but is generated from the source code for the modules. To submit an update to module docs, edit the 'DOCUMENTATION' metadata in the <a href="https://github.com/ansible/ansible/tree/devel/lib/ansible/modules">modules directory</a> of the <a href="https://github.com/ansible/ansible/">core source code repository</a>. {% endif %}
|
||||
Ansible docs are generated from <a href="https://github.com/ansible/ansible">GitHub sources</a> using <a href="http://sphinx-doc.org/">Sphinx</a> using a theme provided by <a href="http://readthedocs.org">Read the Docs</a>.
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user