tpl: Use .Lastmod in embedded schema template
authorAkshay Raj Gollahalli <akshaybabloo@users.noreply.github.com>
Tue, 16 Oct 2018 09:52:32 +0000 (22:52 +1300)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 16 Oct 2018 09:52:32 +0000 (11:52 +0200)
Fixes #5320

tpl/tplimpl/embedded/templates.autogen.go
tpl/tplimpl/embedded/templates/schema.html

index 2b36ae37b7eaadaadfb78585a2b4f4851a310734..e2d94dc8bf63965119b1ad2b5943ccebac3b5116 100644 (file)
@@ -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 }}">
index bef45b16762ddcb3c6707b86dccc62f7649f7a7b..16c97be60cb05dbc39e84152e18461ed3dcd193f 100644 (file)
@@ -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 }}">