| 1 |
{#- Template for admonitions in docstrings. |
| 2 |
|
| 3 |
This template renders admonitions using the `details` HTML element. |
| 4 |
|
| 5 |
Context: |
| 6 |
section (griffe.DocstringSectionAdmonition): The section to render. |
| 7 |
-#} |
| 8 |
|
| 9 |
{% block logs scoped %} |
| 10 |
{#- Logging block. |
| 11 |
|
| 12 |
This block can be used to log debug messages, deprecation messages, warnings, etc. |
| 13 |
-#} |
| 14 |
{{ log.debug("Rendering admonition") }} |
| 15 |
{% endblock logs %} |
| 16 |
|
| 17 |
<details class="{{ section.value.kind }}" open> |
| 18 |
<summary>{{ section.title|convert_markdown(heading_level, html_id, strip_paragraph=True, autoref_hook=autoref_hook) }}</summary> |
| 19 |
{{ section.value.contents|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }} |
| 20 |
</details> |