mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit 'bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45'
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
{{ $package := (index .Params 0) }}
|
||||
{{ $listname := (index .Params 1) }}
|
||||
{{ $filter := split (index .Params 2) " " }}
|
||||
{{ $filter1 := index $filter 0 }}
|
||||
{{ $filter2 := index $filter 1 }}
|
||||
{{ $filter3 := index $filter 2 }}
|
||||
|
||||
{{ $list := (index (index .Site.Data.docs $package) $listname) }}
|
||||
{{ $fields := after 3 .Params }}
|
||||
{{ $list := where $list $filter1 $filter2 $filter3 }}
|
||||
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
{{ range $fields }}
|
||||
<th>{{ . }}</th>
|
||||
{{ end }}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range $list }}
|
||||
<tr>
|
||||
{{ range $k, $v := . }}
|
||||
{{ $.Scratch.Set $k $v }}
|
||||
{{ end }}
|
||||
{{ range $k, $v := $fields }}
|
||||
<td>
|
||||
{{ $tdContent := $.Scratch.Get . }}
|
||||
{{ if eq $k 3 }}
|
||||
{{ printf "%v" $tdContent |
|
||||
strings.ReplaceRE `\[` "<ol><li>" |
|
||||
strings.ReplaceRE `\s` "</li><li>" |
|
||||
strings.ReplaceRE `\]` "</li></ol>" |
|
||||
safeHTML
|
||||
}}
|
||||
{{ else }}
|
||||
{{ $tdContent }}
|
||||
{{ end }}
|
||||
</td>
|
||||
{{ end }}
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
@@ -46,9 +46,6 @@ button will be hidden if any of the following conditions is true:
|
||||
{{- else }}
|
||||
<span
|
||||
class="not-prose inline-flex items-center px-2 mr-1 rounded text-sm font-medium bg-green-200 dark:bg-green-400 fill-green-600">
|
||||
<svg class="mr-1.5 h-2 w-2" viewBox="0 0 8 8">
|
||||
<circle cx="4" cy="4" r="3" />
|
||||
</svg>
|
||||
<a
|
||||
class="text-green-800 dark:text-black hover:text-green-600 no-underline"
|
||||
href="{{ $href }}"
|
||||
|
11
docs/layouts/_shortcodes/newtemplatesystem.html
Normal file
11
docs/layouts/_shortcodes/newtemplatesystem.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{{ $text := `We did a complete overhaul of Hugo's template system in v0.146.0.
|
||||
We're working on getting all of the relevant documentation up to date, but until
|
||||
then, see [this page](/templates/new-templatesystem-overview/). `
|
||||
}}
|
||||
{{ partial "layouts/blocks/alert.html"
|
||||
(dict
|
||||
"color" "orange"
|
||||
"icon" "information-circle"
|
||||
"text" ($text | $.Page.RenderString )
|
||||
"title" "")
|
||||
}}
|
Reference in New Issue
Block a user