summaryrefslogtreecommitdiff
path: root/docs/templates
diff options
context:
space:
mode:
authorSandra McCann <samccann@redhat.com>2019-01-23 14:21:23 -0500
committerAlicia Cozine <879121+acozine@users.noreply.github.com>2019-01-23 13:21:23 -0600
commit3eec7f18207193494c6b7b41d89fa8f03357589d (patch)
tree90524ba2d73d8b8ee6bf0c78c76767b5a5820827 /docs/templates
parent2d83db70366654484aed1f84a920e982964fbf9c (diff)
downloadansible-3eec7f18207193494c6b7b41d89fa8f03357589d.tar.gz
Modules tocfix (#51077)
define & create subcategories, output by category and subcat
Diffstat (limited to 'docs/templates')
-rw-r--r--docs/templates/modules_by_support.rst.j237
1 files changed, 33 insertions, 4 deletions
diff --git a/docs/templates/modules_by_support.rst.j2 b/docs/templates/modules_by_support.rst.j2
index 368a2f0b0d..eced773f3d 100644
--- a/docs/templates/modules_by_support.rst.j2
+++ b/docs/templates/modules_by_support.rst.j2
@@ -3,14 +3,43 @@
{# avoids rST "isn't included in any toctree" errors for module index docs #}
:orphan:
+**************************@{ '*' * maintainers | length }@
Modules Maintained by the @{ maintainers }@
-``````````````````````````@{ '`' * maintainers | length }@
+**************************@{ '*' * maintainers | length }@
+
+.. contents::
+ :local:
+
+{% for category, data in subcategories.items() | sort %}
+
+{% if category.lower() %}
+.. _@{ category.lower() + '_' + slug.lower() + '_categories' }@:
+{% else %}
+.. _@{ slug.lower() + '_categories' }@:
+{% endif %}
+
+@{ category.title() }@
+@{ '=' * category | length }@
+
+{% for name, info in data.items() | sort %}
+
+{% if name.lower() %}
+.. _@{ name.lower() + '_' + category + '_' + slug.lower() + '_' + plugin_type + 's' }@:
+{% else %}
+.. _@{ slug.lower() + '_' + category }@:
+{% endif %}
+
+@{ name.title() }@
+@{ '-' * name | length }@
+
+{% for module in info['_modules'] | sort %}
+ * :ref:`@{ module }@_@{plugin_type}@`{% if module_info[module]['deprecated'] %} **(D)** {% endif%}
+{% endfor %}
+
+{% endfor %}
-{% for module in modules | sort %}
- * :ref:`@{ module }@_@{plugin_type}@`{% if module_info[module]['deprecated'] %} **(D)**{% endif%}
{% 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.
-