mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-26 09:46:04 +03:00
docs: fix missing options of submodules
This commit is contained in:
parent
f2f428f758
commit
8cf6639c8b
@ -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
|
||||
|
||||
|
||||
|
10
docs/theme/reference_options.html
vendored
10
docs/theme/reference_options.html
vendored
@ -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 %}
|
||||
|
Loading…
Reference in New Issue
Block a user