|
| 1 | +{{- $data := "" }} |
| 2 | +{{- if .Params.datafolder }} |
| 3 | + {{- $data = index (index site.Data .Params.datafolder) .Params.datafile }} |
| 4 | +{{- else }} |
| 5 | + {{- $data = index site.Data .Params.datafile }} |
| 6 | +{{- end -}} |
| 7 | +--- |
| 8 | +title: {{ .Title }} |
| 9 | +url: {{ .Permalink }} |
| 10 | +{{- range .Ancestors }} |
| 11 | + {{- if and (not .IsHome) .Permalink }} |
| 12 | +parent: |
| 13 | + title: {{ .Title }} |
| 14 | + url: {{ .Permalink }} |
| 15 | + {{- break }} |
| 16 | + {{- end }} |
| 17 | +{{- end }} |
| 18 | +{{- if .Ancestors }} |
| 19 | +breadcrumbs: |
| 20 | +{{- range .Ancestors.Reverse }} |
| 21 | + {{- if and (not .IsHome) .Permalink }} |
| 22 | + - title: {{ .Title }} |
| 23 | + url: {{ .Permalink }} |
| 24 | + {{- end }} |
| 25 | +{{- end }} |
| 26 | + - title: {{ .Title }} |
| 27 | + url: {{ .Permalink }} |
| 28 | +{{- end }} |
| 29 | +{{- with .NextInSection }} |
| 30 | +next: |
| 31 | + title: {{ .Title }} |
| 32 | + url: {{ .Permalink }} |
| 33 | +{{- end }} |
| 34 | +{{- with .PrevInSection }} |
| 35 | +prev: |
| 36 | + title: {{ .Title }} |
| 37 | + url: {{ .Permalink }} |
| 38 | +{{- end }} |
| 39 | +--- |
| 40 | + |
| 41 | +{{ with $data.short }}**Description:** {{ . }}{{ end }} |
| 42 | + |
| 43 | +{{ with $data.usage }}**Usage:** `{{ . }}`{{ end }} |
| 44 | + |
| 45 | +{{ with $data.aliases }}{{ $aliases := strings.Replace . (printf "%s, " $.Title) "" }}**Aliases:** {{ range $i, $alias := (strings.Split $aliases ", ") }}{{ if $i }}, {{ end }}`{{ $alias }}`{{ end }}{{ end }} |
| 46 | + |
| 47 | +{{ .Content }} |
| 48 | + |
| 49 | +{{ if $data.deprecated }}> [!WARNING] |
| 50 | +> **Deprecated** |
| 51 | +> |
| 52 | +> This command is deprecated. It may be removed in a future Docker version. |
| 53 | +{{ end }} |
| 54 | + |
| 55 | +{{ if or $data.experimental $data.experimentalcli }}> [!NOTE] |
| 56 | +> **Experimental** |
| 57 | +> |
| 58 | +> This command is experimental. Experimental features are intended for testing and feedback as their functionality or design may change between releases without warning or can be removed entirely in a future release. |
| 59 | +{{ end }} |
| 60 | + |
| 61 | +{{ with $data.kubernetes }}**Orchestrator:** Kubernetes{{ end }} |
| 62 | +{{ with $data.swarm }}**Orchestrator:** Swarm{{ end }} |
| 63 | + |
| 64 | +{{ with $data.long }}## Description |
| 65 | + |
| 66 | +{{ . }} |
| 67 | +{{ end }} |
| 68 | + |
| 69 | +{{ with $data.options }}{{ $opts := where . "hidden" false }}{{ with $opts }}## Options |
| 70 | + |
| 71 | +| Option | Default | Description | |
| 72 | +|--------|---------|-------------| |
| 73 | +{{ range . }}{{ $short := .shorthand }}{{ $long := .option }}| {{ with $short }}`-{{ . }}`, {{ end }}`--{{ $long }}` | {{ with .default_value }}{{ $skipDefault := `[],map[],false,0,0s,default,'',""` }}{{ cond (in $skipDefault .) "" (printf "`%s`" .) }}{{ end }} | {{ with .min_api_version }}API {{ . }}+{{ end }}{{ with .deprecated }} **Deprecated**{{ end }}{{ with .experimental }} **experimental (daemon)**{{ end }}{{ with .experimentalcli }} **experimental (CLI)**{{ end }}{{ with .kubernetes }} **Kubernetes**{{ end }}{{ with .swarm }} **Swarm**{{ end }}{{ if .description }} {{ strings.Replace .description "\n" "<br>" }}{{ end }} | |
| 74 | +{{ end }} |
| 75 | +{{ end }}{{ end }} |
| 76 | + |
| 77 | +{{ with $data.examples }}## Examples |
| 78 | + |
| 79 | +{{ . }} |
| 80 | +{{ end }} |
| 81 | + |
| 82 | +{{ if eq .Kind "section" }}## Subcommands |
| 83 | + |
| 84 | +| Command | Description | |
| 85 | +|---------|-------------| |
| 86 | +{{ range .Pages }}{{ if and .Params.datafolder .Params.datafile }}{{ $subdata := index (index site.Data .Params.datafolder) .Params.datafile }}| [`{{ .Title }}`]({{ .Permalink }}) | {{ $subdata.short }} | |
| 87 | +{{ end }}{{ end }} |
| 88 | +{{ end }} |
0 commit comments