From be0a98239da27b790977fdb490995f77c1d2dc93 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sun, 15 Jan 2017 20:20:48 +0000 Subject: [PATCH] Fix sitemap.xml (#91) - Remove invalid homepage widget links generated by Hugo --- layouts/sitemap.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 layouts/sitemap.xml diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml new file mode 100644 index 00000000..35803fad --- /dev/null +++ b/layouts/sitemap.xml @@ -0,0 +1,13 @@ + + {{ range (where .Data.Pages "Section" "!=" "home") }} + {{ $perm := add $.Site.LanguagePrefix "/home/" }} + {{ if ne .RelPermalink $perm }} + + {{ .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 }} + + {{ end }} + {{ end }} +