|
13 | 13 | {{ .Scratch.Set "subheadings" slice }} |
14 | 14 | {{ partial "breadcrumbs.html" . }} |
15 | 15 | <article class="DocSearch-content prose max-w-none dark:prose-invert"> |
16 | | - {{ if ne .LinkTitle .Title }} |
17 | | - {{/* |
18 | | - we use linkTitle for surfacing popular aliases like "docker run" |
19 | | - if linkTitle is set, use both alias and canonical cmd as title |
20 | | - */}} |
21 | | - <h1 class="scroll-mt-36">{{ .LinkTitle }}<span |
22 | | - class="text-gray-light dark:text-gray-dark"> ({{ .Title }})</span> |
23 | | - </h1> |
24 | | - {{ else }} |
25 | 16 | <h1 class="scroll-mt-36">{{ .Title }}</h1> |
26 | | - {{ end }} |
27 | | - {{ $data.short | .RenderString (dict "display" "block") }} |
| 17 | + <table> |
| 18 | + <tbody> |
| 19 | + {{ with $data.short }} |
| 20 | + <tr> |
| 21 | + <th class="text-left w-32">Description</th> |
| 22 | + <td>{{ . }}</th> |
| 23 | + </tr> |
| 24 | + {{ end }} |
| 25 | + {{ with $data.usage }} |
| 26 | + <tr> |
| 27 | + <th class="text-left w-32">Usage</th> |
| 28 | + <td><code>{{ . }}</code></td> |
| 29 | + </tr> |
| 30 | + {{ end }} |
| 31 | + {{ with $data.aliases }} |
| 32 | + {{ $aliases := strings.Replace . (fmt.Printf "%s, " page.Title) "" }} |
| 33 | + <tr> |
| 34 | + <th class="text-left w-32 flex items-center gap-2"> |
| 35 | + <span>Aliases</span> |
| 36 | + {{ partial "tooltip.html" "An alias is a short or memorable alternative for a longer command." }} |
| 37 | + </th> |
| 38 | + <td> |
| 39 | + <div class="flex gap-3"> |
| 40 | + {{ range (strings.Split $aliases ", ") }} |
| 41 | + <code>{{ . }}</code> |
| 42 | + {{ end }} |
| 43 | + </div> |
| 44 | + </td> |
| 45 | + </tr> |
| 46 | + {{ end }} |
| 47 | + </tbody> |
| 48 | + </table> |
28 | 49 | {{ .Content }} |
29 | 50 | {{ if $data.deprecated }} |
30 | 51 | <blockquote class="warning"> |
@@ -60,23 +81,6 @@ <h1 class="scroll-mt-36">{{ .Title }}</h1> |
60 | 81 | This command works with the Swarm orchestrator. |
61 | 82 | </p> |
62 | 83 | {{ end }} |
63 | | - {{ with $data.usage }} |
64 | | - {{ $heading := dict "level" 2 "text" "Usage" }} |
65 | | - {{ partial "heading.html" $heading }} |
66 | | - {{ $.Scratch.Add "headings" $heading }} |
67 | | - {{ highlight (strings.Replace . "\t" "") "console" }} |
68 | | - {{ end }} |
69 | | - {{ with $data.aliases }} |
70 | | - {{ $heading := dict "level" 2 "text" "Aliases" }} |
71 | | - {{ partial "heading.html" $heading }} |
72 | | - {{ $aliases := strings.Split . ", " }} |
73 | | - <p>The following commands are equivalent and redirect here:</p> |
74 | | - <ul> |
75 | | - {{ range $aliases }} |
76 | | - <li><code>{{ . }}</code></li> |
77 | | - {{ end }} |
78 | | - </ul> |
79 | | - {{ end }} |
80 | 84 | {{ with $data.long }} |
81 | 85 | {{ $heading := dict "level" 2 "text" "Description" }} |
82 | 86 | {{ partial "heading.html" $heading }} |
|
0 commit comments