Nouveau thème pour 2026
This commit is contained in:
25
themes/2026/layouts/_partials/keywords.html
Normal file
25
themes/2026/layouts/_partials/keywords.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{{- $items := . -}}
|
||||
{{- if gt (len $items) 0 -}}
|
||||
<ul>
|
||||
{{- $type := printf "%T" $items -}}
|
||||
{{- $isTextList := hasPrefix $type "[]string" -}}
|
||||
{{- if $isTextList -}}
|
||||
{{- range sort $items -}}
|
||||
<li>{{ . }}</li>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- range sort $items "Title" -}}
|
||||
{{- $itemType := printf "%T" . -}}
|
||||
{{- $isPage := or (strings.HasPrefix $itemType "*hugolib.") (strings.HasPrefix $itemType "page.") -}}
|
||||
{{- if $isPage -}}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}">{{ with .LinkTitle }}{{ . }}{{ else }}{{ .Title }}{{ end }}</a>
|
||||
{{ with .Pages }}<sub>{{ len . }}</sub>{{ else }}<sub>0</sub>{{ end }}
|
||||
</li>
|
||||
{{- else -}}
|
||||
<li>{{ . }}</li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user