diff options
author | Dick Visser <dick.visser@geant.org> | 2020-02-03 20:11:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-03 20:11:48 +0100 |
commit | 5b93a14a0f2474bbab86a41f3f0841a02158eaf5 (patch) | |
tree | 15f9e4d32e980d28987efc35d754e8f7e7c5927e /docs/templates | |
parent | 6024c09be5fc37012764b1a71167b2f1be07547c (diff) | |
download | ansible-5b93a14a0f2474bbab86a41f3f0841a02158eaf5.tar.gz |
Add anchor to each parameter row (#66895)
* Add anchor to each paramater row
* Update docs/templates/plugin.rst.j2
Co-Authored-By: Felix Fontein <felix@fontein.de>
* Insert full keys into plugin docs.
* Added visible links.
Co-authored-by: Felix Fontein <felix@fontein.de>
Diffstat (limited to 'docs/templates')
-rw-r--r-- | docs/templates/plugin.rst.j2 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/templates/plugin.rst.j2 b/docs/templates/plugin.rst.j2 index 0d974f2cca..af99932fe9 100644 --- a/docs/templates/plugin.rst.j2 +++ b/docs/templates/plugin.rst.j2 @@ -106,7 +106,7 @@ Parameters <th width="100%">Comments</th> </tr> {% for key, value in options|dictsort recursive %} - <tr> + <tr id="parameter-{% for part in value.full_key %}@{ part }@{% if not loop.last %}/{% endif %}{% endfor %}"> {# indentation based on nesting level #} {% for i in range(1, loop.depth) %} <td class="elbow-placeholder"></td> @@ -114,6 +114,7 @@ Parameters {# parameter name with required and/or introduced label #} <td colspan="@{ from_kludge_ns('maxdepth') - loop.depth0 }@"> <b>@{ key }@</b> + <a class="ansibleOptionLink" href="#parameter-{% for part in value.full_key %}@{ part }@{% if not loop.last %}/{% endif %}{% endfor %}" title="Permalink to this option">¶</a> <div style="font-size: small"> <span style="color: purple">@{ value.type | documented_type }@</span> {% if value.get('elements') %} / <span style="color: purple">elements=@{ value.elements | documented_type }@</span>{% endif %} @@ -282,12 +283,13 @@ Facts returned by this module are added/updated in the ``hostvars`` host facts a <th width="100%">Description</th> </tr> {% for key, value in returnfacts|dictsort recursive %} - <tr> + <tr id="return-{% for part in value.full_key %}@{ part }@{% if not loop.last %}/{% endif %}{% endfor %}"> {% for i in range(1, loop.depth) %} <td class="elbow-placeholder"></td> {% endfor %} <td colspan="@{ from_kludge_ns('maxdepth') - loop.depth0 }@" colspan="@{ from_kludge_ns('maxdepth') - loop.depth0 }@"> <b>@{ key }@</b> + <a class="ansibleOptionLink" href="#return-{% for part in value.full_key %}@{ part }@{% if not loop.last %}/{% endif %}{% endfor %}" title="Permalink to this fact">¶</a> <div style="font-size: small"> <span style="color: purple">@{ value.type | documented_type }@</span> {% if value.elements %} / <span style="color: purple">elements=@{ value.elements | documented_type }@</span>{% endif %} @@ -357,12 +359,13 @@ Common return values are documented :ref:`here <common_return_values>`, the foll <th width="100%">Description</th> </tr> {% for key, value in returndocs|dictsort recursive %} - <tr> + <tr id="return-{% for part in value.full_key %}@{ part }@{% if not loop.last %}/{% endif %}{% endfor %}"> {% for i in range(1, loop.depth) %} <td class="elbow-placeholder"> </td> {% endfor %} <td colspan="@{ from_kludge_ns('maxdepth') - loop.depth0 }@"> <b>@{ key }@</b> + <a class="ansibleOptionLink" href="#return-{% for part in value.full_key %}@{ part }@{% if not loop.last %}/{% endif %}{% endfor %}" title="Permalink to this return value">¶</a> <div style="font-size: small"> <span style="color: purple">@{ value.type | documented_type }@</span> {% if value.elements %} / <span style="color: purple">elements=@{ value.elements | documented_type }@</span>{% endif %} |