From c26a312819ae87eb1bef73daebe76b435a9dc052 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 3 Mar 2020 13:12:06 +0100 Subject: adding support for hidden pages --- layouts/sitemap.xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 layouts/sitemap.xml (limited to 'layouts/sitemap.xml') diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml new file mode 100644 index 0000000..d5ae26e --- /dev/null +++ b/layouts/sitemap.xml @@ -0,0 +1,22 @@ +{{ printf "" | safeHTML }} + + {{ range where .Data.Pages "Params.hidden" "ne" "true" }} + + {{ .Permalink }}{{ if not .Lastmod.IsZero }} + {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} + {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} + {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} + {{ end }} + {{ end }} + + {{ end }} + -- cgit v1.2.3