{#- Template for TwinCAT documentation.

This template renders TwinCAT documentation sections.

Context:
  documentation: The object containing documentation to render.
  heading_level (int): The HTML heading level to use.
  config (dict): The configuration options.
-#}

{% if documentation.details%}
    {{ documentation.details|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
{% endif %}

{% if documentation.usage%}
<p><span class="doc-section-title">Usage</span></p>
    {{ documentation.usage|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
{% endif %}

{% if documentation.return%}
<p><span class="doc-section-title">Details</span></p>
    {{ documentation.return|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
{% endif %}


{% if documentation.custom_tags%}
  {% for tag_name, tag_value in documentation.custom_tags.items() %}
  <p><span class="doc-section-title">{{tag_name}}</span></p>
      {{ tag_value|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
  {% endfor %}
{% endif %}
