hugo docs mention that booleans shouldn't be quoted -> https://gohugo.io/functions/where/#use-where-with-booleans
31 lines
776 B
HTML
31 lines
776 B
HTML
{{- define "main" }}
|
|
|
|
{{- if .Title }}
|
|
<header class="page-header">
|
|
<h1>{{ .Title }}</h1>
|
|
{{- if .Description }}
|
|
<div class="post-description">
|
|
{{ .Description }}
|
|
</div>
|
|
{{- end }}
|
|
</header>
|
|
{{- end }}
|
|
|
|
<ul class="terms-tags">
|
|
{{- $type := .Type }}
|
|
{{- range $term := .Data.Terms.Alphabetical }}
|
|
{{- $termPages := where $term.Pages "Params.hiddenPage" "!=" true }}
|
|
{{- if (len $termPages | ne 0) }}
|
|
{{- $name := $term.Name }}
|
|
{{- $count := len $termPages }}
|
|
{{- with site.GetPage (printf "/%s/%s" $type $name) }}
|
|
<li>
|
|
<a href="{{ .Permalink }}">{{ $name }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
|
|
</li>
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
</ul>
|
|
|
|
{{- end }}{{/* end main */ -}}
|