mirror of https://github.com/docker/docs.git
Merge pull request #19539 from dvdksn/cli-reference-tpl-fixups
cli reference template improvements
This commit is contained in:
commit
6a1bb3da95
|
@ -94,6 +94,8 @@
|
||||||
{{ . | $.RenderString (dict "display" "block") }}
|
{{ . | $.RenderString (dict "display" "block") }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with $data.options }}
|
{{ with $data.options }}
|
||||||
|
{{ $opts := where . "hidden" false }}
|
||||||
|
{{ with $opts }}
|
||||||
{{ $heading := dict "level" 2 "text" "Options" }}
|
{{ $heading := dict "level" 2 "text" "Options" }}
|
||||||
{{ partial "heading.html" $heading }}
|
{{ partial "heading.html" $heading }}
|
||||||
{{ $.Scratch.Add "headings" $heading }}
|
{{ $.Scratch.Add "headings" $heading }}
|
||||||
|
@ -106,7 +108,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{ range where . "hidden" false }}
|
{{ range . }}
|
||||||
<tr>
|
<tr>
|
||||||
{{ $short := .shorthand }}
|
{{ $short := .shorthand }}
|
||||||
{{ $long := .option }}
|
{{ $long := .option }}
|
||||||
|
@ -154,6 +156,7 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
{{ with $data.examples }}
|
{{ with $data.examples }}
|
||||||
{{ $heading := dict "level" 2 "text" "Examples" }}
|
{{ $heading := dict "level" 2 "text" "Examples" }}
|
||||||
{{ partial "heading.html" $heading }}
|
{{ partial "heading.html" $heading }}
|
||||||
|
@ -166,6 +169,28 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $.RenderString (dict "display" "block") . }}
|
{{ $.RenderString (dict "display" "block") . }}
|
||||||
{{ end }}
|
{{ 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>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue