ansible-community / antsibull-docs

Tooling for building Ansible documentation
https://ansible.readthedocs.io/projects/antsibull-docs/
GNU General Public License v3.0
22 stars 17 forks source link

Move label generating code to one place #269

Closed felixfontein closed 3 months ago

felixfontein commented 3 months ago

Cherry-picked from #216 and then extended.

felixfontein commented 3 months ago

TODO: look at similar labels:

src/antsibull_docs/data/docsite/simplified-rst/macros/attributes.rst.j2:  * - .. _ansible_collections.@{plugin_name}@_@{plugin_type}@__attribute-@{ attribute }@:
src/antsibull_docs/data/docsite/simplified-rst/plugin.rst.j2:see `Requirements <ansible_collections.@{plugin_name}@_@{plugin_type}@_requirements_>`_ for details.
src/antsibull_docs/data/docsite/simplified-rst/plugin.rst.j2:.. _ansible_collections.@{plugin_name}@_@{plugin_type}@_requirements:
src/antsibull_docs/data/docsite/ansible-docsite/macros/parameters.rst.j2:      .. _ansible_collections.@{plugin_name}@_@{plugin_type}@__parameter-@{ parameter_rst_prefix }@{% for part in full_key %}@{ part }@{% if not loop.last %}/{% endif %}{% endfor %}:
src/antsibull_docs/data/docsite/ansible-docsite/macros/attributes.rst.j2:      .. _ansible_collections.@{plugin_name}@_@{plugin_type}@__attribute-@{ attribute }@:
src/antsibull_docs/data/docsite/ansible-docsite/macros/returnvalues.rst.j2:      .. _ansible_collections.@{plugin_name}@_@{plugin_type}@__return-{% for part in full_key %}@{ part }@{% if not loop.last %}/{% endif %}{% endfor %}:
src/antsibull_docs/data/docsite/ansible-docsite/plugin.rst.j2:.. _ansible_collections.@{plugin_name}@_@{plugin_type}@_requirements: