mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-22 22:11:50 +03:00
docs: improve options reference layout
This commit is contained in:
parent
5f3051487a
commit
c1d1502486
@ -6,3 +6,7 @@
|
||||
[data-md-component="toc"] .md-nav__link {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.md-typeset td pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
8
docs/theme/reference_options.html
vendored
8
docs/theme/reference_options.html
vendored
@ -3,13 +3,15 @@
|
||||
|
||||
##{{loop.depth * "#"}} {{ ((option.loc | join (".")) or name).replace("<", "<").replace(">", ">") }}
|
||||
|
||||
{% if (option.description or '') != "This option has no description." -%}
|
||||
{{ option.description or '' }}
|
||||
{%- endif %}
|
||||
|
||||
{% if "type" in option %}
|
||||
<table>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td><code>{{ option.type }}</code> {{ "(read only)" if option.readOnly else "" }}</td>
|
||||
<td>{{ option.type}} {{ "(read only)" if option.readOnly else "" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>source</td>
|
||||
@ -18,14 +20,14 @@
|
||||
{%- if option.default -%}
|
||||
<tr>
|
||||
<td>default</td>
|
||||
<td><pre>{{(option.default | default({})).text | pygments("nix")}}</pre></td>
|
||||
<td>{{(option.default | default({})).text | pygments("nix")}}</td>
|
||||
</tr>
|
||||
{%- endif -%}
|
||||
{%- if option.example -%}
|
||||
<tr>
|
||||
<td>example</td>
|
||||
<td>
|
||||
<pre>{{(option.example | default({})).text | pygments("nix")}}</pre>
|
||||
{{(option.example | default({})).text | pygments("nix")}}
|
||||
</td>
|
||||
</tr>
|
||||
{%- endif -%}
|
||||
|
Loading…
Reference in New Issue
Block a user