mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-12-19 00:52:19 +01:00
layouts/_default/list.html: Use .Date for modification time on nodes
I'm not sure if it really matters to bots who will parse this (it's much more important on content pages of course), but using .Date on nodes like the homepage and taxonomy terms pages will set the date to be that of the latest post in that range—to me this does indeed seem to be "time when the object was last updated"[0]. [0] https://developers.facebook.com/docs/reference/opengraph/object-type/website/
This commit is contained in:
parent
868b5b3c13
commit
d6cc7839ef
@ -10,6 +10,10 @@
|
|||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
"name": {{ .Site.Params.author }}
|
"name": {{ .Site.Params.author }}
|
||||||
},
|
},
|
||||||
|
{{ $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
||||||
|
{{ if not .Date.IsZero }}
|
||||||
|
"dateModified": {{ .Date.Format $ISO8601 }},
|
||||||
|
{{ end }}
|
||||||
{{ with .Site.Social.GooglePlus }}
|
{{ with .Site.Social.GooglePlus }}
|
||||||
"publisher": {{ printf "%s" . }},
|
"publisher": {{ printf "%s" . }},
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user