Slightly improve how tags are fetched

This commit is contained in:
Eryn Wells 2022-10-09 17:35:16 -07:00
parent c48d7e0f3b
commit db890fb19f

View file

@ -14,13 +14,13 @@
</section>
<footer>
{{ if .Params.tags }}
{{- if .Params.tags -}}
<ul class="tags">
{{ range .Params.tags }} {{ $href := print (absURL "tags/") (urlize .) }}
<li><a href="{{ $href }}">{{ . }}</a></li>
{{ end }}
{{- range (.GetTerms "tags") -}}
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{- end -}}
</ul>
{{ end }}
{{- end -}}
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ if and (gt (len $pages) 1) (in $pages . ) }}