1

Apparence et navigation dans les taxonomies

This commit is contained in:
2025-11-06 22:36:03 +01:00
parent d02c785633
commit 316ade0330
7 changed files with 67 additions and 14 deletions

View File

@@ -3,11 +3,19 @@
<ul class="keywords">
{{- range (sort $items "Title") }}
{{- $type := printf "%T" . -}}
{{- if or (strings.HasPrefix $type "*hugolib.") (strings.HasPrefix $type "page.") }}
<li><a href="{{ .RelPermalink }}">{{ with .LinkTitle }}{{ . }}{{ else }}{{ .Title }}{{ end }}</a></li>
{{- else }}
<li>{{ . }}</li>
{{- end }}
{{- $isPage := or (strings.HasPrefix $type "*hugolib.") (strings.HasPrefix $type "page.") -}}
<li>
{{- if $isPage -}}
<a href="{{ .RelPermalink }}">{{ with .LinkTitle }}{{ . }}{{ else }}{{ .Title }}{{ end }}</a>
{{ with .Pages -}}
<sub>{{ len . }}</sub>
{{- else -}}
<sub>0</sub>
{{- end -}}
{{- else -}}
{{ . }}<sub></sub>
{{- end }}
</li>
{{- end }}
</ul>
{{- end }}