diff --git a/themes/nluug/layouts/custom/sitemap.html b/themes/nluug/layouts/custom/sitemap.html
index bae303f..659a253 100644
--- a/themes/nluug/layouts/custom/sitemap.html
+++ b/themes/nluug/layouts/custom/sitemap.html
@@ -3,22 +3,13 @@
{{ .Content }}
Secties
-{{ $sections := (where $.Site.Pages ".Kind" "section").ByTitle }}
-
-{{ range $sections }}
-
- {{ $sectionName := .Section | singularize }}
- {{ $pages := (where $.Site.RegularPages ".Section" $sectionName) }}
-
+{{ range $.Site.Sections.ByTitle }}
+
+ {{ partial "recursive-pages.html" . }}
{{ end }}
+
Laatste wijzigingen
{{ $byLastMod := .Site.RegularPages.ByLastmod.Reverse }}
@@ -34,7 +25,7 @@
- {{ range first 50 $byLastMod }}
+ {{ range first 20 $byLastMod }}
{{ .Lastmod | dateFormat "2006-01-02 15:04:05" }} |
{{ .Title }} |
diff --git a/themes/nluug/layouts/partials/recursive-pages.html b/themes/nluug/layouts/partials/recursive-pages.html
new file mode 100644
index 0000000..07bc42f
--- /dev/null
+++ b/themes/nluug/layouts/partials/recursive-pages.html
@@ -0,0 +1,11 @@
+{{ $child_pages := union .Sections .Pages }}
+
+ {{ range $child_pages.ByTitle }}
+ -
+ {{ .Title }}
+ {{ if or (.Sections) (.Pages) }}
+ {{ partial "recursive-pages.html" . }}
+ {{ end }}
+
+ {{ end }}
+