diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja index fd537034..796a104b 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja @@ -1,4 +1,20 @@ +{#- Template for Python attributes. + +This template renders a Python attribute (or variable). +This can be a module attribute or a class attribute. + +Context: + attribute (griffe.dataclasses.Attribute): The attribute to render. + root (bool): Whether this is the root object, injected with `:::` in a Markdown page. + heading_level (int): The HTML heading level to use. + config (dict): The configuration options. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering " + attribute.path) }} {% endblock logs %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/children.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/children.html.jinja index b63b9a6a..0484a303 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/children.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/children.html.jinja @@ -1,5 +1,21 @@ +{#- Template for members (children) of an object. + +This template iterates on members of a given object and renders them. +It can group members by category (attributes, classes, functions, modules) or render them in a flat list. + +Context: + obj (griffe.dataclasses.Object): The object to render. + config (dict): The configuration options. + root_members (bool): Whether the object is the root object. + heading_level (int): The HTML heading level to use. +-#} + {% if obj.members %} {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering children of " + obj.path) }} {% endblock logs %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/class.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/class.html.jinja index 2bfa2bf0..50e814de 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/class.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/class.html.jinja @@ -1,4 +1,19 @@ +{#- Template for Python classes. + +This template renders a Python class. + +Context: + class (griffe.dataclasses.Class): The class to render. + root (bool): Whether this is the root object, injected with `:::` in a Markdown page. + heading_level (int): The HTML heading level to use. + config (dict): The configuration options. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering " + class.path) }} {% endblock logs %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html.jinja index 8477dc0a..3d9ed5c4 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html.jinja @@ -1,5 +1,22 @@ +{#- Template for docstrings. + +This template renders Python docstrings. +Griffe parses docstrings into a list of sections, each with a `kind` and a `value`. +This template can then iterate on these sections and render them according to the configuration. + +Context: + docstring_sections (list[griffe.docstrings.dataclasses.DocstringSection]): The list of docstring sections. + config (dict): The configuration dictionary. + heading_level (int): The heading level to use for Markdown conversion. + html_id (str): The HTML ID to use for Markdown conversion. +-#} + {% if docstring_sections %} {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering docstring") }} {% endblock logs %} {% for section in docstring_sections %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html.jinja index b5053342..4a6376ab 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html.jinja @@ -1,7 +1,20 @@ +{#- Template for admonitions in docstrings. + +This template renders admonitions using the `details` HTML element. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAdmonition): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering admonition") }} {% endblock logs %} +
{{ section.title|convert_markdown(heading_level, html_id, strip_paragraph=True) }} {{ section.value.contents|convert_markdown(heading_level, html_id) }} -
\ No newline at end of file + diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja index d1bb3bb0..03f52d7f 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja @@ -1,11 +1,26 @@ +{#- Template for "Attributes" sections in docstrings. + +This template renders a list of documented attributes in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering attributes section") }} {% endblock logs %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#} {% if config.docstring_section_style == "table" %} {% block table_style scoped %} + {#- Block for the `table` section style. -#}

{{ section.title or lang.t("Attributes:") }}

@@ -38,6 +53,7 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} + {#- Block for the `list` section style. -#}

{{ section.title or lang.t("Attributes:") }}

diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja index 60ec7e54..21c1ccfd 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja @@ -1,4 +1,17 @@ +{#- Template for "Classes" sections in docstrings. + +This template renders a list of documented classes in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering classes section") }} {% endblock logs %} @@ -6,6 +19,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} + {#- Block for the `table` section style. -#}

{{ section.title or lang.t("Classes:") }}

@@ -30,6 +44,7 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} + {#- Block for the `list` section style. -#}

{{ section.title or lang.t("Classes:") }}

diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja index 1e79a53a..125860df 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja @@ -1,4 +1,17 @@ +{#- Template for "Examples" sections in docstrings. + +This template renders a list of documented examples. +It alternates between rendering text and code examples. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering examples section") }} {% endblock logs %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja index 35197c80..cf0435e2 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja @@ -1,4 +1,17 @@ +{#- Template for "Functions" sections in docstrings. + +This template renders a list of documented functions in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering functions section") }} {% endblock logs %} @@ -6,6 +19,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} + {#- Block for the `table` section style. -#}

{{ section.title or lang.t("Methods:") if obj.is_class else lang.t("Functions:") }}

@@ -32,6 +46,7 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} + {#- Block for the `list` section style. -#}

{{ section.title or lang.t("Methods:") if obj.is_class else lang.t("Functions:") }}

diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja index fc212db9..31e23900 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja @@ -1,4 +1,17 @@ +{#- Template for "Modules" sections in docstrings. + +This template renders a list of documented modules in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering modules section") }} {% endblock logs %} @@ -6,6 +19,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} + {#- Block for the `table` section style. -#}

{{ section.title or lang.t("Modules:") }}

@@ -30,6 +44,7 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} + {#- Block for the `list` section style. -#}

{{ section.title or lang.t("Modules:") }}

diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja index c3d4af97..d2c076c4 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja @@ -1,4 +1,17 @@ +{#- Template for "Other parameters" sections in docstrings. + +This template renders a list of documented other parameters in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering other parameters section") }} {% endblock logs %} @@ -6,6 +19,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} + {#- Block for the `table` section style. -#}

{{ section.title or lang.t("Other Parameters:") }}

@@ -38,6 +52,7 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} + {#- Block for the `list` section style. -#}

{{ section.title or lang.t("Other Parameters:") }}

diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja index f411e114..814e8a2d 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja @@ -1,4 +1,17 @@ +{#- Template for "Parameters" sections in docstrings. + +This template renders a list of documented parameters in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering parameters section") }} {% endblock logs %} @@ -6,6 +19,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} + {#- Block for the `table` section style. -#}

{{ section.title or lang.t("Parameters:") }}

@@ -48,6 +62,7 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} + {#- Block for the `list` section style. -#}

{{ section.title or lang.t("Parameters:") }}

diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja index 12ff1496..a5e907b4 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja @@ -1,4 +1,17 @@ +{#- Template for "Raises" sections in docstrings. + +This template renders a list of documented exceptions in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering raises section") }} {% endblock logs %} @@ -6,6 +19,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} + {#- Block for the `table` section style. -#}

{{ section.title or lang.t("Raises:") }}

@@ -36,6 +50,7 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} + {#- Block for the `list` section style. -#}

{{ lang.t(section.title) or lang.t("Raises:") }}

diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja index 13e0ea30..cb6d67a1 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja @@ -1,4 +1,17 @@ +{#- Template for "Receives" sections in docstrings. + +This template renders a list of documented received values (generators) in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering receives section") }} {% endblock logs %} @@ -6,6 +19,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} + {#- Block for the `table` section style. -#} {% set name_column = section.value|selectattr("name")|any %}

{{ section.title or lang.t("Receives:") }}

@@ -39,6 +53,7 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} + {#- Block for the `list` section style. -#}

{{ section.title or lang.t("Receives:") }}

diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja index 9a330780..66a3b63a 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja @@ -1,4 +1,17 @@ +{#- Template for "Returns" sections in docstrings. + +This template renders a list of documented returned values in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering returns section") }} {% endblock logs %} @@ -6,6 +19,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} + {#- Block for the `table` section style. -#} {% set name_column = section.value|selectattr("name")|any %}

{{ section.title or lang.t("Returns:") }}

@@ -39,6 +53,7 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} + {#- Block for the `list` section style. -#}

{{ section.title or lang.t("Returns:") }}

diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja index b8ed3851..845d9188 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja @@ -1,4 +1,17 @@ +{#- Template for "Warns" sections in docstrings. + +This template renders a list of documented warnings in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering warns section") }} {% endblock logs %} @@ -6,6 +19,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} + {#- Block for the `table` section style. -#}

{{ section.title or lang.t("Warns:") }}

@@ -36,6 +50,7 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} + {#- Block for the `list` section style. -#}

{{ section.title or lang.t("Warns:") }}

diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja index 6172a254..79b663c8 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja @@ -1,4 +1,17 @@ +{#- Template for "Yields" sections in docstrings. + +This template renders a list of documented yielded values (generators) in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering yields section") }} {% endblock logs %} @@ -6,6 +19,7 @@ {% if config.docstring_section_style == "table" %} {% block table_style scoped %} + {#- Block for the `table` section style. -#} {% set name_column = section.value|selectattr("name")|any %}

{{ section.title or lang.t("Yields:") }}

@@ -39,6 +53,7 @@ {% endblock table_style %} {% elif config.docstring_section_style == "list" %} {% block list_style scoped %} + {#- Block for the `list` section style. -#}

{{ section.title or lang.t("Yields:") }}

diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja index c219f636..ebe6fb26 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja @@ -1,4 +1,8 @@ {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {% endblock logs %} {%- macro crossref(name, annotation_path) -%} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/function.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/function.html.jinja index c4d0f1fc..94da698f 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/function.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/function.html.jinja @@ -1,4 +1,8 @@ {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering " + function.path) }} {% endblock logs %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/labels.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/labels.html.jinja index bcdc112b..e1349312 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/labels.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/labels.html.jinja @@ -1,5 +1,9 @@ {% if config.show_labels and labels %} {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering labels") }} {% endblock logs %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/language.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/language.html.jinja index dd3fe800..5b643726 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/language.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/language.html.jinja @@ -1,6 +1,12 @@ +{#- Import translation macros for the given language and fallback language. -#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {% endblock logs %} - + {% set lang_pth = "languages/" ~ locale | get_template %} {% if lang_pth is existing_template %} {% import lang_pth as lang %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html.jinja index 5a771d30..0bd2dc65 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html.jinja @@ -1,6 +1,12 @@ - +{#- English translations. -#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {% endblock logs %} + {% macro t(key) %}{{ { "ATTRIBUTE": "ATTRIBUTE", "Attributes:": "Attributes:", @@ -36,4 +42,4 @@ "Warns:": "Warns:", "YIELDS": "YIELDS", "Yields:": "Yields:", -}[key] }}{% endmacro %} \ No newline at end of file +}[key] }}{% endmacro %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html.jinja index 748fd8b7..a6b7728b 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html.jinja @@ -1,6 +1,12 @@ - +{#- Macro for Japanese translations. -#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {% endblock logs %} + {% macro t(key) %}{{ { "ATTRIBUTE": "属性", "Attributes:": "属性:", @@ -36,4 +42,4 @@ "Warns:": "警告:", "YIELDS": "返す", "Yields:": "返す:", -}[key] }}{% endmacro %} \ No newline at end of file +}[key] }}{% endmacro %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html.jinja index 772e33cd..f748b83c 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html.jinja @@ -1,6 +1,12 @@ - +{#- Macro for Chinese translations. -#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {% endblock logs %} + {% macro t(key) %}{{ { "ATTRIBUTE": "属性", "Attributes:": "属性:", @@ -36,4 +42,4 @@ "WARNS": "警告", "YIELDS": "产生", "Yields:": "产生:", -}[key] }}{% endmacro %} \ No newline at end of file +}[key] }}{% endmacro %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/module.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/module.html.jinja index 02665e20..e942d76a 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/module.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/module.html.jinja @@ -1,4 +1,8 @@ {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering " + module.path) }} {% endblock logs %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/signature.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/signature.html.jinja index d5bd4220..3f55da85 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/signature.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/signature.html.jinja @@ -1,5 +1,9 @@ {%- if config.show_signature -%} {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug("Rendering signature") }} {% endblock logs %} {%- with -%} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/summary.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/summary.html.jinja index 2390659d..c267b17c 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/summary.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/summary.html.jinja @@ -1,2 +1,6 @@ {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {% endblock logs %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html.jinja index 2390659d..cb966fb1 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html.jinja @@ -1,2 +1,8 @@ +{#- Summary of attributes. -#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {% endblock logs %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/summary/classes.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/summary/classes.html.jinja index 2390659d..94456775 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/summary/classes.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/summary/classes.html.jinja @@ -1,2 +1,8 @@ +{#- Summary of classes. -#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {% endblock logs %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/summary/functions.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/summary/functions.html.jinja index 2390659d..5e8305aa 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/summary/functions.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/summary/functions.html.jinja @@ -1,2 +1,8 @@ +{#- Summary of functions/methods. -#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {% endblock logs %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/summary/modules.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/summary/modules.html.jinja index 2390659d..04387b32 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/summary/modules.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/summary/modules.html.jinja @@ -1,2 +1,8 @@ +{#- Summary of modules. -#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {% endblock logs %}