Fix OpenGraph image fallback to site params

Signed-off-by: Elliot Murphy <statik@users.noreply.github.com>
This commit is contained in:
Elliot Murphy 2019-01-24 23:19:59 -05:00 committed by Bjørn Erik Pedersen
parent 26f75edb7a
commit 526b5b1c49
2 changed files with 2 additions and 2 deletions

View file

@ -175,7 +175,7 @@ if (!doNotTrack) {
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{- with .Params.images }}{{ range first 6 . }}
{{ with $.Param "images" }}{{ range first 6 . }}
<meta property="og:image" content="{{ . | absURL }}" />
{{ end }}{{ end }}

View file

@ -2,7 +2,7 @@
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{- with .Params.images }}{{ range first 6 . }}
{{ with $.Param "images" }}{{ range first 6 . }}
<meta property="og:image" content="{{ . | absURL }}" />
{{ end }}{{ end }}