docs: fix missing options of submodules

This commit is contained in:
phaer 2024-06-15 20:34:53 +02:00
parent f2f428f758
commit 8cf6639c8b
2 changed files with 9 additions and 10 deletions

View File

@ -19,7 +19,7 @@ def slugify(name: str) -> str:
def preprocess_options(options):
tree = {}
tree = dict()
for name, option in options.items():
if name.startswith("_module"):
continue
@ -28,13 +28,12 @@ def preprocess_options(options):
for index, part in enumerate(parts):
if part not in cursor:
if index + 1 == len(parts):
cursor[part] = option
cursor[part] = dict(**option, children={})
else:
cursor[part] = dict()
cursor[part] = dict(children=dict())
cursor = cursor[part]
else:
cursor = cursor[part]
cursor = cursor[part]["children"]
return tree

View File

@ -3,10 +3,9 @@
##{{loop.depth * "#"}} {{ name }}
{% if "type" in option -%}
{{ option.description }}
{{ option.description or '' }}
{% if "type" in option %}
<table>
<tr>
<td>type</td>
@ -31,7 +30,8 @@
</tr>
{%- endif -%}
</table>
{%- else -%}
{{ loop(option.items()) }}
{% endif %}
{%- if option.children -%}
{{ loop(option.children.items()) }}
{%- endif %}
{%- endfor %}