Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix role docs section levels #367

Merged
merged 2 commits into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/367-role-headings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bugfixes:
- "Fix role section heading levels. Examples and attributes should be below role entrypoints
(https://github.com/ansible-community/antsibull-docs/issues/366, https://github.com/ansible-community/antsibull-docs/pull/367)."
4 changes: 2 additions & 2 deletions src/antsibull_docs/data/docsite/ansible-docsite/role.rst.j2
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Parameters
{% if ep_doc['attributes'] %}

Attributes
----------
^^^^^^^^^^

@{ attributes_rst(ep_doc['attributes'], attribute_html_prefix=entry_point ~ '--', role_entrypoint=entry_point) }@
{% endif %}
Expand Down Expand Up @@ -194,7 +194,7 @@ See Also

{% if ep_doc['examples'] and ep_doc['examples'] | trim -%}
Examples
--------
^^^^^^^^

.. code-block:: @{ ep_doc['examples_format'] | rst_format(for_sphinx=true) }@

Expand Down
4 changes: 2 additions & 2 deletions src/antsibull_docs/data/docsite/simplified-rst/role.rst.j2
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Parameters
{% if ep_doc['attributes'] %}

Attributes
----------
^^^^^^^^^^

@{ attributes_rst(ep_doc['attributes'], role_entrypoint=entry_point) }@
{% endif %}
Expand Down Expand Up @@ -152,7 +152,7 @@ See Also

{% if ep_doc['examples'] and ep_doc['examples'] | trim -%}
Examples
--------
^^^^^^^^

.. code-block:: @{ ep_doc['examples_format'] | rst_format }@

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Synopsis


Examples
--------
^^^^^^^^

.. code-block:: yaml+jinja

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Parameters


Attributes
----------
^^^^^^^^^^

.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}

Expand Down Expand Up @@ -283,7 +283,7 @@ See Also
The official documentation on the **ns2.col.foo** module.

Examples
--------
^^^^^^^^

.. code-block:: yaml+jinja

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Synopsis


Examples
--------
^^^^^^^^

.. code-block:: yaml+jinja

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Parameters


Attributes
----------
^^^^^^^^^^

.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}

Expand Down Expand Up @@ -283,7 +283,7 @@ See Also
The official documentation on the **ns2.col.foo** module.

Examples
--------
^^^^^^^^

.. code-block:: yaml+jinja

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Parameters


Attributes
----------
^^^^^^^^^^

.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}

Expand Down Expand Up @@ -280,7 +280,7 @@ See Also
The official documentation on the **ns2.col.foo** module.

Examples
--------
^^^^^^^^

.. code-block:: yaml+jinja

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Parameters


Attributes
----------
^^^^^^^^^^

.. list-table::
:widths: auto
Expand Down Expand Up @@ -134,7 +134,7 @@ See Also
The official documentation on the **ns2.col.foo** module.

Examples
--------
^^^^^^^^

.. code-block:: yaml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Synopsis


Examples
--------
^^^^^^^^

.. code-block:: yaml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Parameters


Attributes
----------
^^^^^^^^^^

.. list-table::
:widths: auto
Expand Down Expand Up @@ -134,7 +134,7 @@ See Also
The official documentation on the **ns2.col.foo** module.

Examples
--------
^^^^^^^^

.. code-block:: yaml

Expand Down
4 changes: 2 additions & 2 deletions tests/functional/baseline-squash-hierarchy/foo_role.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Parameters


Attributes
----------
^^^^^^^^^^

.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}

Expand Down Expand Up @@ -283,7 +283,7 @@ See Also
The official documentation on the **ns2.col.foo** module.

Examples
--------
^^^^^^^^

.. code-block:: yaml+jinja

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Parameters


Attributes
----------
^^^^^^^^^^

.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}

Expand Down Expand Up @@ -236,7 +236,7 @@ See Also
The official documentation on the **ns2.col.foo** module.

Examples
--------
^^^^^^^^

.. code-block:: yaml+jinja

Expand Down
Loading