mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-23 00:13:02 +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
|
``` shellsession
|
||||||
# update
|
# 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
|
# remove
|
||||||
rm ./src/reference
|
rm ./src/reference
|
||||||
```
|
```
|
||||||
|
20
docs/theme/reference_options.html
vendored
20
docs/theme/reference_options.html
vendored
@ -1,37 +1,37 @@
|
|||||||
## Options
|
## Options
|
||||||
{%- for name, children in options.items() recursive %}
|
{%- for name, option in options.items() recursive %}
|
||||||
|
|
||||||
##{{loop.depth * "#"}} {{ name }}
|
##{{loop.depth * "#"}} {{ name }}
|
||||||
|
|
||||||
{% if "type" in children -%}
|
{% if "type" in option -%}
|
||||||
|
|
||||||
{{ children.description }}
|
{{ option.description }}
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>type</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>source</td>
|
<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>
|
</tr>
|
||||||
{%- if children.default -%}
|
{%- if option.default -%}
|
||||||
<tr>
|
<tr>
|
||||||
<td>default</td>
|
<td>default</td>
|
||||||
<td><pre>{{(children.default | default({})).text}}</pre></td>
|
<td><pre>{{(option.default | default({})).text}}</pre></td>
|
||||||
</tr>
|
</tr>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- if children.example -%}
|
{%- if option.example -%}
|
||||||
<tr>
|
<tr>
|
||||||
<td>example</td>
|
<td>example</td>
|
||||||
<td>
|
<td>
|
||||||
<pre>{{(children.example | default({})).text | replace("\n", "\\n")}}</pre>
|
<pre>{{(option.example | default({})).text | replace("\n", "\\n")}}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</table>
|
</table>
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{ loop(children.items()) }}
|
{{ loop(option.items()) }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
Loading…
Reference in New Issue
Block a user