MkDefinitionList
Node for definition lists.¶
Example: Regular¶
Jinja
Python
- something
-
- A definition
- something_else
- Another definition
Example: Nested markdown¶
Jinja
Info
Nested
- something
-
- A definition
- something_else
-
Info
Nested
Name | Children | Inherits |
---|---|---|
MkContainer mknodes.basenodes.mkcontainer A node containing other MkNodes. |
graph TD
94721311917888["mkdefinitionlist.MkDefinitionList"]
94721311697232["mkcontainer.MkContainer"]
94721308848336["mknode.MkNode"]
94721311766592["node.Node"]
140564252373184["builtins.object"]
94721311697232 --> 94721311917888
94721308848336 --> 94721311697232
94721311766592 --> 94721308848336
140564252373184 --> 94721311766592
/home/runner/work/mknodes/mknodes/mknodes/basenodes/mkdefinitionlist/metadata.toml
[metadata]
icon = "mdi:library"
name = "MkDefinitionList"
[requirements.extension.def_list]
[examples.regular]
title = "Regular"
jinja = """
{{ {"something": "A definition", "something_else": "Another\ndefinition"} | MkDefinitionList }}
"""
[examples.nested]
title = "Nested markdown"
jinja = """
{{ {"something": "A definition", "something_else": ("Nested" | MkAdmonition)} | MkDefinitionList }}
"""
[output.markdown]
template = """
{% for k, v in node.data.items() %}
{{ k }}
: {{ v | string | indent }}
{% endfor %}
"""
[output.rst]
template = """
{% for k, v in node.data.items() %}
{{ k }}
{{ v | string | indent(width=2) }}
{% endfor %}
"""