diff options
author | Hanzei <hanzei@mailbox.org> | 2018-07-06 15:27:34 +0300 |
---|---|---|
committer | Hanzei <hanzei@mailbox.org> | 2018-07-06 15:31:16 +0300 |
commit | 088c65bac52435ba325696213172d083b58a799d (patch) | |
tree | 92d00449f5ef746bf7a8ab5499c70e7fbb1de679 /layouts/partials/head/openGraph.html | |
parent | 32d393c2dfcf426a79be70824dfcfdd415105911 (diff) |
Use Image Processing to resize images
Diffstat (limited to 'layouts/partials/head/openGraph.html')
-rw-r--r-- | layouts/partials/head/openGraph.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/layouts/partials/head/openGraph.html b/layouts/partials/head/openGraph.html index 736ba45..8022127 100644 --- a/layouts/partials/head/openGraph.html +++ b/layouts/partials/head/openGraph.html @@ -3,8 +3,11 @@ <meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}"/> <meta property="og:url" content="{{ .Permalink }}"/> <meta property="og:site_name" content="{{ .Site.Title }}"/> -{{ if .Params.image }} -<meta property="og:image" content="{{ .Params.image | absURL }}"/> + +{{ with .Resources.ByType "image" }} +{{ range first 5 (sort . "Params.weight") }} +<meta property="og:image" content="{{ .Permalink }}"/> +{{ end }} {{ else }} <meta property="og:image" content="{{ .Site.Params.avatar | absURL }}"/> {{ end }} |