mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-26 09:46:04 +03:00
docs: children -> option
This commit is contained in:
parent
4266fcc0ab
commit
d4c77a62d6
@ -32,7 +32,7 @@ i.e. from inside the shell in `./docs`:
|
||||
|
||||
``` shellsession
|
||||
# update
|
||||
ln -sfT $(nix build --print-out-paths --no-link ..#reference) ./src/reference
|
||||
ln -sfT $(nix build --print-out-paths --no-link ..#optionsReference) ./src/reference
|
||||
# remove
|
||||
rm ./src/reference
|
||||
```
|
||||
|
20
docs/theme/reference_options.html
vendored
20
docs/theme/reference_options.html
vendored
@ -1,37 +1,37 @@
|
||||
## Options
|
||||
{%- for name, children in options.items() recursive %}
|
||||
{%- for name, option in options.items() recursive %}
|
||||
|
||||
##{{loop.depth * "#"}} {{ name }}
|
||||
|
||||
{% if "type" in children -%}
|
||||
{% if "type" in option -%}
|
||||
|
||||
{{ children.description }}
|
||||
{{ option.description }}
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td><code>{{ children.type }}</code> {{ "(read only)" if children.readOnly else "" }}</td>
|
||||
<td><code>{{ option.type }}</code> {{ "(read only)" if option.readOnly else "" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>source</td>
|
||||
<td>{%- for d in children.declarations -%}<a href="{{d.url}}">{{d.name}}</a>{{ ", " if not loop.last else "" }}{%- endfor -%}</td>
|
||||
<td>{%- for d in option.declarations -%}<a href="{{d.url}}">{{d.name}}</a>{{ ", " if not loop.last else "" }}{%- endfor -%}</td>
|
||||
</tr>
|
||||
{%- if children.default -%}
|
||||
{%- if option.default -%}
|
||||
<tr>
|
||||
<td>default</td>
|
||||
<td><pre>{{(children.default | default({})).text}}</pre></td>
|
||||
<td><pre>{{(option.default | default({})).text}}</pre></td>
|
||||
</tr>
|
||||
{%- endif -%}
|
||||
{%- if children.example -%}
|
||||
{%- if option.example -%}
|
||||
<tr>
|
||||
<td>example</td>
|
||||
<td>
|
||||
<pre>{{(children.example | default({})).text | replace("\n", "\\n")}}</pre>
|
||||
<pre>{{(option.example | default({})).text | replace("\n", "\\n")}}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
{%- endif -%}
|
||||
</table>
|
||||
{%- else -%}
|
||||
{{ loop(children.items()) }}
|
||||
{{ loop(option.items()) }}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user