Apparence et navigation dans les taxonomies
This commit is contained in:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user