2019-10-21 04:22:28 -04:00
|
|
|
{{ $package := (index .Params 0) }}
|
|
|
|
{{ $listname := (index .Params 1) }}
|
|
|
|
{{ $list := (index (index .Site.Data.docs $package) $listname) }}
|
|
|
|
{{ $fields := after 2 .Params }}
|
|
|
|
|
2023-08-07 04:52:52 -04:00
|
|
|
|
2019-10-21 04:22:28 -04:00
|
|
|
<table class="table table-bordered">
|
2023-08-07 04:52:52 -04:00
|
|
|
<tr>
|
|
|
|
{{ range $fields }}
|
|
|
|
{{ $s := . }}
|
|
|
|
{{ if eq $s "_key" }}
|
|
|
|
{{ $s = "Type" }}
|
|
|
|
{{ end }}
|
|
|
|
<th>{{ $s }}</th>
|
|
|
|
{{ end }}
|
|
|
|
</tr>
|
|
|
|
{{ range $k1, $v1 := $list }}
|
|
|
|
<tr>
|
|
|
|
{{ range $k2, $v2 := . }}
|
|
|
|
{{ $.Scratch.Set $k2 $v2 }}
|
|
|
|
{{ end }}
|
|
|
|
{{ range $fields }}
|
|
|
|
{{ $s := "" }}
|
|
|
|
{{ if eq . "_key" }}
|
|
|
|
{{ $s = $k1 }}
|
|
|
|
{{ else }}
|
|
|
|
{{ $s = $.Scratch.Get . }}
|
|
|
|
{{ end }}
|
|
|
|
<td>{{ $s }}</td>
|
|
|
|
{{ end }}
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
2019-10-21 04:22:28 -04:00
|
|
|
</table>
|