diff options
author | Elliot Murphy <statik@users.noreply.github.com> | 2019-01-24 23:19:59 -0500 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-01-25 18:14:10 +0100 |
commit | 526b5b1c4986d43d6184671b02f45ca40f041b65 (patch) | |
tree | fc9e1da1ae07c891bad0927b11629503781acfba | |
parent | 26f75edb7a76c816349749a05edf98fb36dc338a (diff) |
Fix OpenGraph image fallback to site params
Signed-off-by: Elliot Murphy <statik@users.noreply.github.com>
-rw-r--r-- | tpl/tplimpl/embedded/templates.autogen.go | 2 | ||||
-rw-r--r-- | tpl/tplimpl/embedded/templates/opengraph.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go index c0a82bc6a..ed9ba35ac 100644 --- a/tpl/tplimpl/embedded/templates.autogen.go +++ b/tpl/tplimpl/embedded/templates.autogen.go @@ -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 }} diff --git a/tpl/tplimpl/embedded/templates/opengraph.html b/tpl/tplimpl/embedded/templates/opengraph.html index 0cc9a213c..8e4fb8115 100644 --- a/tpl/tplimpl/embedded/templates/opengraph.html +++ b/tpl/tplimpl/embedded/templates/opengraph.html @@ -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 }} |