diff options
author | Jimmy Cai <jimmehcai@gmail.com> | 2020-09-11 17:01:01 +0300 |
---|---|---|
committer | Jimmy Cai <jimmehcai@gmail.com> | 2020-09-11 17:01:01 +0300 |
commit | cfd4cdb731750786f787b7aaea6a9f411caa5af2 (patch) | |
tree | 430a267cd9b818b50bac1da27dd7f1cac55384cb /layouts/partials/head/opengraph.html | |
parent | 3e18e165e0dbc10ea1e81c745a04ea7ae82c6e47 (diff) |
feat(helper/image): new return format
Diffstat (limited to 'layouts/partials/head/opengraph.html')
-rw-r--r-- | layouts/partials/head/opengraph.html | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/layouts/partials/head/opengraph.html b/layouts/partials/head/opengraph.html index 654c55c..26c987a 100644 --- a/layouts/partials/head/opengraph.html +++ b/layouts/partials/head/opengraph.html @@ -42,13 +42,9 @@ {{ $image := partial "helper/image" . }} {{- if $image.exists -}} - {{ $imagePermalink := $image.src }} - {{ if $image.local }} - {{ $imagePermalink = absURL $image.src.RelPermalink }} - {{ end }} <meta name="twitter:card" content="summary_large_image"> - <meta property='og:image' content='{{ $imagePermalink }}' /> - <meta name="twitter:image" content='{{ $imagePermalink }}' /> + <meta property='og:image' content='{{ $image.permalink }}' /> + <meta name="twitter:image" content='{{ $image.permalink }}' /> {{- else if .Site.Params.opengraph.defaultImage -}} {{ $image := resources.Get .Site.Params.opengraph.defaultImage }} <meta property='og:image' content='{{ absURL $image.RelPermalink }}' /> |