ansible/docs/templates/list_of_CATEGORY_modules.rst.j2
Dag Wieers 7da7ba79bc Add anchors to some guides and all module categories (#36642)
* Add anchors to some guides and all module categories

This is required if we want to use *absolute* :ref: references instead of *relative* :doc: references.

* Update the Cisco ACI Guide reference

* Add `aci_guide` anchor

* Add `network_guide` anchor

* Add category anchor

* Improve readability

* Fix small typo
2018-02-23 17:10:47 -06:00

37 lines
1.2 KiB
Django/Jinja

.. _@{ title.lower() + '_' + plugin_type + 's' }@:
@{ title }@ @{ plugin_type + 's' }@
@{ '`' * title | length }@````````
{% if blurb %}
@{ blurb }@
{% endif %}
.. toctree:: :maxdepth: 1
{% if category['_modules'] %}
{% for module in category['_modules'] | sort %}
@{ module }@{% if module_info[module]['deprecated'] %} **(D)**{% endif%} -- @{ module_info[module]['doc']['short_description'] }@ <@{ module }@_module>
{% endfor %}
{% endif %}
{% for name, info in subcategories.items() | sort %}
.. _@{ name.lower() + '_' + title.lower() + '_' + plugin_type + 's' }@:
@{ name.title() }@
@{ '-' * name | length }@
.. toctree:: :maxdepth: 1
{% for module in info['_modules'] | sort %}
{# :ref:`@{ module }@`{% if module_info[module]['deprecated'] %} **(D)**{% endif%} @{ module_info[module]['doc']['short_description'] }@ #}
@{ module }@{% if module_info[module]['deprecated'] %} **(D)**{% endif%} -- @{ module_info[module]['doc']['short_description'] }@ <@{ module }@_module>
{% endfor %}
{% endfor %}
.. note::
- **(D)**: This marks a module as deprecated, which means a module is kept for backwards compatibility but usage is discouraged.
The module documentation details page may explain more about this rationale.