From f26ddf6a48d8aae41ce4b6cae5da1ce34766f942 Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Wed, 29 Mar 2023 13:11:40 +0200 Subject: [PATCH] chore: sitemap handling (#2) Signed-off-by: Simon Schrottner --- layouts/_default/sitemap.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 layouts/_default/sitemap.xml diff --git a/layouts/_default/sitemap.xml b/layouts/_default/sitemap.xml new file mode 100644 index 0000000..ca7a76a --- /dev/null +++ b/layouts/_default/sitemap.xml @@ -0,0 +1,24 @@ +{{ printf "" | safeHTML }} + + {{ range .Data.Pages }} + {{- if and (not (in .RelPermalink "docs-v")) (.Permalink) -}} + + {{ .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 -}} + {{ end }} + \ No newline at end of file