dream2nix/docs/theme/reference_options.html

41 lines
1.1 KiB
HTML
Raw Normal View History

## Options
2024-06-14 16:32:42 +03:00
{%- for name, option in options.items() recursive %}
##{{"##"}} {{ ((option.loc | join (".")) or name).replace("<", "&lt;").replace(">", "&gt;") }}
2024-06-18 14:17:34 +03:00
{% if (option.description or '') != "This option has no description." -%}
{{ option.description or '' }}
2024-06-18 14:17:34 +03:00
{%- endif %}
{% if "type" in option %}
<table>
<tr>
<td>type</td>
2024-06-18 14:17:34 +03:00
<td>{{ option.type}} {{ "(read only)" if option.readOnly else "" }}</td>
</tr>
<tr>
<td>source</td>
2024-06-14 16:32:42 +03:00
<td>{%- for d in option.declarations -%}<a href="{{d.url}}">{{d.name}}</a>{{ ", " if not loop.last else "" }}{%- endfor -%}</td>
</tr>
2024-06-14 16:32:42 +03:00
{%- if option.default -%}
<tr>
<td>default</td>
2024-06-18 14:17:34 +03:00
<td>{{(option.default | default({})).text | pygments("nix")}}</td>
</tr>
{%- endif -%}
2024-06-14 16:32:42 +03:00
{%- if option.example -%}
<tr>
<td>example</td>
<td>
2024-06-18 14:17:34 +03:00
{{(option.example | default({})).text | pygments("nix")}}
</td>
</tr>
{%- endif -%}
2024-06-18 13:58:02 +03:00
</table>
{% endif %}
{%- if option.children -%}
{{ loop(option.children.items()) }}
{%- endif %}
{%- endfor %}