summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkshay Raj Gollahalli <akshaybabloo@users.noreply.github.com>2018-10-16 22:52:32 +1300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-10-16 11:52:32 +0200
commitc21e5179ce9a370c416c01fbe9472be1fb5c6650 (patch)
tree8303ba1df1b9fc8ab60c8018c8e3fd0f5df47855
parenta205f24ba56f18217e79ea29f74daabb1f594e8e (diff)
tpl: Use .Lastmod in embedded schema template
Fixes #5320
-rw-r--r--tpl/tplimpl/embedded/templates.autogen.go2
-rw-r--r--tpl/tplimpl/embedded/templates/schema.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go
index 2b36ae37b..e2d94dc8b 100644
--- a/tpl/tplimpl/embedded/templates.autogen.go
+++ b/tpl/tplimpl/embedded/templates.autogen.go
@@ -265,7 +265,7 @@ if (!doNotTrack) {
{{if .IsPage}}{{ $ISO8601 := "2006-01-02T15:04:05-07:00" }}{{ if not .PublishDate.IsZero }}
<meta itemprop="datePublished" content="{{ .PublishDate.Format $ISO8601 | safeHTML }}" />{{ end }}
-{{ if not .Date.IsZero }}<meta itemprop="dateModified" content="{{ .Date.Format $ISO8601 | safeHTML }}" />{{ end }}
+{{ if not .Lastmod.IsZero }}<meta itemprop="dateModified" content="{{ .Lastmod.Format $ISO8601 | safeHTML }}" />{{ end }}
<meta itemprop="wordCount" content="{{ .WordCount }}">
{{ with .Params.images }}{{ range first 6 . }}
<meta itemprop="image" content="{{ . | absURL }}">
diff --git a/tpl/tplimpl/embedded/templates/schema.html b/tpl/tplimpl/embedded/templates/schema.html
index bef45b167..16c97be60 100644
--- a/tpl/tplimpl/embedded/templates/schema.html
+++ b/tpl/tplimpl/embedded/templates/schema.html
@@ -4,7 +4,7 @@
{{if .IsPage}}{{ $ISO8601 := "2006-01-02T15:04:05-07:00" }}{{ if not .PublishDate.IsZero }}
<meta itemprop="datePublished" content="{{ .PublishDate.Format $ISO8601 | safeHTML }}" />{{ end }}
-{{ if not .Date.IsZero }}<meta itemprop="dateModified" content="{{ .Date.Format $ISO8601 | safeHTML }}" />{{ end }}
+{{ if not .Lastmod.IsZero }}<meta itemprop="dateModified" content="{{ .Lastmod.Format $ISO8601 | safeHTML }}" />{{ end }}
<meta itemprop="wordCount" content="{{ .WordCount }}">
{{ with .Params.images }}{{ range first 6 . }}
<meta itemprop="image" content="{{ . | absURL }}">