Is there an official format for documenting macros in Jinja?

Question:

I want to document how my Jinja macros work. Is there an official format for documenting macros in Jinja, just like how there are various ways to format Python docstrings?
Maybe something like this:

{% macro my_macro(arg0, arg1, ...) -%}
    {#
    Does something. <- summary of macro

    Parameters:
    arg0: (summary of arg0)
    arg1: (summary of arg1)
    ...
    #}
{%- endmacro %}

Or is it just up to my personal preference?

Asked By: Dull Bananas

||

Answers:

A Jinja macro is just a Python function. Use the same format you use for documenting normal Python functions.

Answered By: Dull Bananas
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.