mirror of
https://github.com/docker/docs.git
synced 2026-11-04 10:01:00 +00:00
hugo: only render subcommand link if cli data exists
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
1 parent
5526949d36
commit
effa260c24
1 file changed
+7
-5
@@ -183,11 +183,13 @@ can be removed entirely in a future release.
|
||||
</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>
|
||||
{{- if and .Params.datafolder .Params.datafile }}
|
||||
<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 }}
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in new issue
Block a user