mirror of https://github.com/docker/docs.git
cli: don't render options table if only hidden options
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
98b3164e57
commit
c04c83ff58
|
@ -94,6 +94,8 @@
|
|||
{{ . | $.RenderString (dict "display" "block") }}
|
||||
{{ end }}
|
||||
{{ with $data.options }}
|
||||
{{ $opts := where . "hidden" false }}
|
||||
{{ with $opts }}
|
||||
{{ $heading := dict "level" 2 "text" "Options" }}
|
||||
{{ partial "heading.html" $heading }}
|
||||
{{ $.Scratch.Add "headings" $heading }}
|
||||
|
@ -106,7 +108,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range where . "hidden" false }}
|
||||
{{ range . }}
|
||||
<tr>
|
||||
{{ $short := .shorthand }}
|
||||
{{ $long := .option }}
|
||||
|
@ -154,6 +156,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with $data.examples }}
|
||||
{{ $heading := dict "level" 2 "text" "Examples" }}
|
||||
{{ partial "heading.html" $heading }}
|
||||
|
|
Loading…
Reference in New Issue