Add subcategories
Deploy / deploy (push) Successful in 4s

This commit is contained in:
2026-10-07 16:21:16 +02:00
parent b826ca3340
commit 03b428836b
+44
View File
@@ -0,0 +1,44 @@
{{- define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end -}}
{{- define "item" -}}
<li>
<a href="{{ .Permalink }}">{{ .Title | title }}</a>
{{ with .Keywords }}<span class="keywords">{{ . }}</span>{{ end }}
{{ with .Description }}<div class="description">{{ . }}</div>{{ end }}
</li>
{{- end }}
{{- define "content" }}
{{- range .Pages.GroupByParam "category" }}
<section class="list-zettels">
<span class="list-title">{{ .Key | title }}:</span>
<ul>
{{- range (where .Pages "Params.subcategory" "eq" nil).ByTitle }}
{{ template "item" . }}
{{- end }}
{{- range .Pages.GroupByParam "subcategory" }}
<li class="subcategory">
<span class="list-subtitle">{{ .Key | title }}:</span>
<ul>
{{- range .Pages.ByTitle }}
{{ template "item" . }}
{{- end }}
</ul>
</li>
{{- end }}
</ul>
</section>
{{- end }}
{{- $uncat := where .Pages "Params.category" "eq" nil }}
{{- if $uncat }}
<section class="list-zettels">
<span class="list-title">Other:</span>
<ul>
{{- range $uncat.ByTitle }}
{{ template "item" . }}
{{- end }}
</ul>
</section>
{{- end }}
{{- end }}