mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Use .Lastmod for og:updated_time
.Lastmod is the time at which the website was most recently updated, rather than .Date which is the time at which the website content file was created.
This commit is contained in:
parent
a5039dddaf
commit
6205d56b85
2 changed files with 2 additions and 2 deletions
2
tpl/tplimpl/embedded/templates.autogen.go
generated
2
tpl/tplimpl/embedded/templates.autogen.go
generated
|
@ -211,7 +211,7 @@ if (!doNotTrack) {
|
|||
{{ end }}
|
||||
{{- if not .Lastmod.IsZero }}<meta property="article:modified_time" {{ .Lastmod.Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
|
||||
{{- else }}
|
||||
{{- if not .Date.IsZero }}<meta property="og:updated_time" {{ .Date.Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />
|
||||
{{- if not .Date.IsZero }}<meta property="og:updated_time" {{ .Lastmod.Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />
|
||||
{{- end }}
|
||||
{{- end }}{{/* .IsPage */}}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
{{ end }}
|
||||
{{- if not .Lastmod.IsZero }}<meta property="article:modified_time" {{ .Lastmod.Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
|
||||
{{- else }}
|
||||
{{- if not .Date.IsZero }}<meta property="og:updated_time" {{ .Date.Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />
|
||||
{{- if not .Date.IsZero }}<meta property="og:updated_time" {{ .Lastmod.Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />
|
||||
{{- end }}
|
||||
{{- end }}{{/* .IsPage */}}
|
||||
|
||||
|
|
Loading…
Reference in a new issue