refactor: migrate to new template system introduced in Hugo v0.146.0 (#1232)

See: https://gohugo.io/templates/new-templatesystem-overview/
This commit is contained in:
Jimmy
2026-01-25 22:42:00 +01:00
committed by GitHub
parent 633c8c6b9f
commit 5f1ab2bc76
71 changed files with 1 additions and 1 deletions
+34
View File
@@ -0,0 +1,34 @@
{{ define "body-class" }}template-archives{{ end }}
{{ define "main" }}
<header>
{{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}}
{{- $terms := $taxonomy.Pages -}}
{{ if $terms }}
<h2 class="section-title">{{ T "widget.categoriesCloud.title" }}</h2>
<div class="subsection-list">
<div class="article-list--tile">
{{ range $terms }}
{{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "taxonomy") }}
{{ end }}
</div>
</div>
{{ end }}
</header>
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $filtered := where $pages "Params.hidden" "!=" true }}
{{ range $filtered.GroupByDate "2006" }}
{{ $id := lower (replace .Key " " "-") }}
<div class="archives-group" id="{{ $id }}">
<h2 class="archives-date section-title"><a href="{{ $.RelPermalink }}#{{ $id }}">{{ .Key }}</a></h2>
<div class="article-list--compact">
{{ range .Pages }}
{{ partial "article-list/compact" . }}
{{ end }}
</div>
</div>
{{ end }}
{{ partialCached "footer/footer" . }}
{{ end }}