cli: add subcommand links

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2024-02-29 16:08:10 +01:00
parent c04c83ff58
commit 51c1bedfb1
1 changed files with 22 additions and 0 deletions

View File

@ -169,6 +169,28 @@
{{ end }}
{{ $.RenderString (dict "display" "block") . }}
{{ end }}
{{ if eq .Kind "section" }}
{{ $heading := dict "level" 2 "text" "Subcommands" }}
{{ partial "heading.html" $heading }}
{{ $.Scratch.Add "headings" $heading }}
<table>
<thead>
<tr>
<th class="text-left">Command</th>
<th class="text-left">Description</th>
</tr>
</thead>
<tbody>
{{ range .Pages }}
<tr>
<td class="text-left"><a class="link" href="{{ .Permalink }}"><code>{{ .Title }}</code></a></th>
{{ $data := index (index site.Data .Params.datafolder) .Params.datafile }}
<td class="text-left">{{ $data.short }}</th>
</tr>
{{ end }}
</tbody>
</table>
{{ end }}
</article>
{{ end }}