mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2026-02-02 09:25:10 +01:00
create static docs site with module options
This commit is contained in:
parent
e3127e8c14
commit
e75b801a31
24 changed files with 448 additions and 19 deletions
40
docs/layouts/partials/details.html
Normal file
40
docs/layouts/partials/details.html
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{{ $name := index . "name" }}
|
||||
{{ $option := index . "option" }}
|
||||
{{ $repo := index . "repo" }}
|
||||
|
||||
{{ $path := path.Join (after 2 (split (index $option.declarations 0) "/")) }}
|
||||
|
||||
<details id="{{ $name }}">
|
||||
<summary>
|
||||
<pre>{{ $name }}</pre>
|
||||
</summary>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ $option.description }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Type</td>
|
||||
<td><pre>{{ $option.type }}</pre></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Default</td>
|
||||
<td>{{ partial "highlight" $option.default }}</td>
|
||||
</tr>
|
||||
|
||||
{{ with $option.example }}
|
||||
<tr>
|
||||
<td>Example</td>
|
||||
<td>{{ partial "highlight" . }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
|
||||
<tr>
|
||||
<td>Declared in</td>
|
||||
<td><a href="{{ $repo }}/blob/main/{{ $path }}" target="_blank">{{ $path }}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</details>
|
||||
Loading…
Add table
Add a link
Reference in a new issue