mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Some more .Date.IsZero checks in internal templates
This commit is contained in:
parent
230e7c02c5
commit
4a9436c116
1 changed files with 2 additions and 2 deletions
|
@ -134,7 +134,7 @@ func (t *GoHtmlTemplate) EmbedTemplates() {
|
|||
<meta property="og:image" content="{{ . }}" />
|
||||
{{ end }}{{ end }}
|
||||
|
||||
<meta property="og:updated_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHtml }}"/>{{ with .Params.audio }}
|
||||
{{ if not .Date.IsZero }}<meta property="og:updated_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHtml }}"/>{{ end }}{{ with .Params.audio }}
|
||||
<meta property="og:audio" content="{{ . }}" />{{ end }}{{ with .Params.locale }}
|
||||
<meta property="og:locale" content="{{ . }}" />{{ end }}{{ with .Site.Params.title }}
|
||||
<meta property="og:site_name" content="{{ . }}" />{{ end }}{{ with .Params.videos }}
|
||||
|
@ -194,7 +194,7 @@ func (t *GoHtmlTemplate) EmbedTemplates() {
|
|||
|
||||
{{if .IsPage}}{{ $ISO8601 := "2006-01-02T15:04:05-07:00" }}{{ if not .PublishDate.IsZero }}
|
||||
<meta itemprop="datePublished" content="{{ .PublishDate.Format $ISO8601 | safeHtml }}" />{{ end }}
|
||||
<meta itemprop="dateModified" content="{{ .Date.Format $ISO8601 | safeHtml }}" />
|
||||
{{ if not .Date.IsZero }}<meta itemprop="dateModified" content="{{ .Date.Format $ISO8601 | safeHtml }}" />{{ end }}
|
||||
<meta itemprop="wordCount" content="{{ .WordCount }}">
|
||||
{{ with .Params.images }}{{ range first 6 . }}
|
||||
<meta itemprop="image" content="{{ . }}">
|
||||
|
|
Loading…
Reference in a new issue