{{ define "head" }} {{ if eq .Type "blog" }} {{ $latestEntry := index (where (where .Site.RegularPages "Type" "blog") "Params.featured" true).ByPublishDate.Reverse 0 }}

{{ $latestEntry.Title }}

{{ $latestEntry.Summary | safeHTML }}

Weiter lesen...

{{ end }} {{ end }} {{ define "main" }} {{/* Paginator initialisieren, in der Reihenfolge die man sich im Blog wünscht */}} {{ if eq .Type "blog" }} {{/* Der 1te Weg soll alle Blog-Einträge finden*/}} {{ $pag := .Paginate (where .Site.RegularPages "Type" "blog").ByPublishDate.Reverse }} {{ else }} {{/* Der 2te Weg ist über die Archive-Gruppierung, und dort wird nicht paginiert */}} {{ $pag := .Paginate .Pages.ByPublishDate.Reverse 9999 }} {{ end }} {{/* Der Paginator wurde in den If-Blöcken zwar erstellt, aber die Variable ist auserhalb nicht sichtbar, daher hier explizit holen. Dieser kann nach dem ersten erstellen auch nicht mehr verändert werden */}} {{ $pag := .Paginator }}

{{ .Title }}

{{ range $pag.Pages }}

{{ .Title }}

{{ partial "metadata.html" . }}

{{ .Summary }}

{{ end }} {{ template "partials/pagination.html" . }} {{ end }} {{ define "sidebar" }}
{{/* range $tax := .Site.Params.Blog.Taxonomies }} {{ $taxUrl := $.Site.GetPage (printf "/%s" $tax) }}

{{ $tax }}

{{ end */}} {{ $catIdent := .Site.Params.Blog.Categories | default "categories" }} {{ $cats := (index $.Site.Taxonomies $catIdent)}} {{ if $cats }}

Kategorien

{{ end }} {{/* https://mertbakir.gitlab.io/hugo/tag-cloud-in-hugo/ */}} {{ $tagsIdent := .Site.Params.Blog.Tags | default "tags" }} {{ $tags := (index $.Site.Taxonomies $tagsIdent)}} {{ if $tags }}

Schlagwortwolke

{{ $parentLink := ($.Site.GetPage (printf "/%s" $tagsIdent)).Permalink }} {{ $maxCnt := mul 1.0 (index $tags.ByCount 0).Count }} {{ $minCnt := mul 1.0 (index $tags.ByCount.Reverse 0).Count }} {{ $div := math.Max 1 (sub $maxCnt $minCnt) }} {{ range $key, $sites := $tags }} {{- (printf `%s%d` (add (mul (math.Pow (div (sub $sites.Count $minCnt) $div) 2.0) 0.6) 0.8) ($parentLink | relURL) $key $sites.Count $key $sites.Count ) | safeHTML -}} {{ end }}
{{ end }} {{/* range $taxonomy_term, $taxonomy := .Site.Taxonomies }} {{ with $.Site.GetPage (printf "/%s" $taxonomy_term) }}

{{ $taxonomy_term }}

{{ end }} {{ end */}}

Archive

{{ end }}