summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax2017-03-01 20:02:42 +0100
committerMax2017-03-01 20:02:42 +0100
commitd77116cd9c02321845fb5cc8581e2bac0c46e93d (patch)
tree266f1273d0ede9ddf34aa7a3093750e8e7df275f
parent9e171e2395e2a628bb947d10981777e4fed4509f (diff)
downloadgospeladlershof.de-d77116cd9c02321845fb5cc8581e2bac0c46e93d.tar.gz
Bugfix in der sitemap.xml. Jetzt wird das korrekte Datum der letzten Modifikation angezeigt.
-rw-r--r--gospeladlershof.de/layouts/sitemap.xml7
1 files changed, 6 insertions, 1 deletions
diff --git a/gospeladlershof.de/layouts/sitemap.xml b/gospeladlershof.de/layouts/sitemap.xml
index 05d8523..7074866 100644
--- a/gospeladlershof.de/layouts/sitemap.xml
+++ b/gospeladlershof.de/layouts/sitemap.xml
@@ -3,7 +3,12 @@
{{if eq .Params.noindex 1 | not}}
<url>
<loc>{{ .Permalink }}</loc>
- <lastmod>{{ safeHTML ( .Date.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ with .Sitemap.ChangeFreq }}
+ {{ if eq .Lastmod.Unix -62135596800}}
+ <lastmod>{{ safeHTML ( now | dateFormat "2006-01-02T15:04:05-07:00" ) }}</lastmod>
+ {{else}}
+ <lastmod>{{ safeHTML ( .Lastmod | dateFormat "2006-01-02T15:04:05-07:00" ) }}</lastmod>
+ {{end}}
+ {{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}
</url>