Fix OpenGraph image fallback to site params
authorElliot Murphy <statik@users.noreply.github.com>
Fri, 25 Jan 2019 04:19:59 +0000 (23:19 -0500)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 25 Jan 2019 17:14:10 +0000 (18:14 +0100)
Signed-off-by: Elliot Murphy <statik@users.noreply.github.com>
tpl/tplimpl/embedded/templates.autogen.go
tpl/tplimpl/embedded/templates/opengraph.html

index c0a82bc6abee0548897974a60f5df857737c71a6..ed9ba35ac30f7bc524c55e65d27d04a88ee80b1f 100644 (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 }}
 
index 0cc9a213ca61111cee2908c9f9d853ece145e487..8e4fb811510245e4f1eef7f559e945acb523bb97 100644 (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 }}