mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-12-19 09:02:18 +01:00
layouts/partials/opengraph.html: Fix date for nodes
.Site.LastChange is the date of the last modification on the entire site, not necessarily on the node we're currently showing, such as a taxonomy list.
This commit is contained in:
parent
64d8bdab83
commit
527bc0d824
@ -32,7 +32,7 @@
|
|||||||
{{ else if not .Date.IsZero }}<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }}
|
{{ else if not .Date.IsZero }}<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }}
|
||||||
{{ if not .Lastmod.IsZero }}<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }}
|
{{ if not .Lastmod.IsZero }}<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ if not .Site.LastChange.IsZero }}<meta property="og:updated_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }}
|
{{ if not .Date.IsZero }}<meta property="og:updated_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }}
|
||||||
{{ end }}{{ with .Params.audio }}
|
{{ end }}{{ with .Params.audio }}
|
||||||
<meta property="og:audio" content="{{ . }}" />{{ end }}{{ with .Params.locale }}
|
<meta property="og:audio" content="{{ . }}" />{{ end }}{{ with .Params.locale }}
|
||||||
<meta property="og:locale" content="{{ . }}" />{{ end }}{{ with .Site.Params.title }}
|
<meta property="og:locale" content="{{ . }}" />{{ end }}{{ with .Site.Params.title }}
|
||||||
|
Loading…
Reference in New Issue
Block a user