diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/themes/maik-blog/layouts/_default/baseof.html b/themes/maik-blog/layouts/_default/baseof.html index 7588d8f..2f279c5 100644 --- a/themes/maik-blog/layouts/_default/baseof.html +++ b/themes/maik-blog/layouts/_default/baseof.html @@ -1,3 +1,4 @@ +{{- $paginator := .Paginate .RegularPagesRecursive }} diff --git a/themes/maik-blog/layouts/partials/seo.html b/themes/maik-blog/layouts/partials/seo.html index fbbdce9..597b6d8 100644 --- a/themes/maik-blog/layouts/partials/seo.html +++ b/themes/maik-blog/layouts/partials/seo.html @@ -210,16 +210,15 @@ {{- end }} {{- end }} "description": {{ .Params.description | plainify }} - }{{ end }}{{ if .IsSection }}, + }{{ end }}{{ if or .IsSection (or (eq .Kind "term") (eq .Kind "taxonomy")) }}, { "@context": "http://schema.org", "@type": "ItemList", "itemListOrder": "https://schema.org/ItemListOrderDescending", "name": "{{ .Title }}", - "numberOfItems": {{ len .Data.Pages }}, + "numberOfItems": {{ .Paginator.TotalNumberOfElements }}, "itemListElement": [ - {{- $pages := first 10 .Data.Pages }} - {{- range $index, $page := $pages }} + {{- range $index, $page := .Paginator.Pages }} { "@type": "ListItem", "position": {{ add $index 1 }}, @@ -283,7 +282,7 @@ {{- end }} "description": {{ .Params.description | plainify }} } - }{{ if ne (sub (len $pages) 1) $index }},{{ end }} + }{{ if ne $index (sub $.Paginator.NumberOfElements 1) }},{{ end }} {{- end }} ] }{{ end }} diff --git a/themes/maik-blog/layouts/writeups/list.html b/themes/maik-blog/layouts/writeups/list.html index 1f95f10..440c072 100644 --- a/themes/maik-blog/layouts/writeups/list.html +++ b/themes/maik-blog/layouts/writeups/list.html @@ -1,14 +1,5 @@ {{ define "main" }} -{{- $allWriteups := slice }} -{{- range where (where .Site.Pages "Section" .Section) "IsPage" true }} -{{- if $.IsAncestor . }} -{{- $allWriteups = $allWriteups | append . }} -{{- end }} -{{- end }} -{{- $allWriteups = sort $allWriteups "Date" "desc" }} -{{ $paginator := .Paginate $allWriteups }} -

{{ .Title }}

@@ -21,7 +12,7 @@ {{- end }}
- {{ range $paginator.Pages }} + {{ range .Paginator.Pages }}