Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <jimmehcai@gmail.com>2020-09-11 17:01:01 +0300
committerJimmy Cai <jimmehcai@gmail.com>2020-09-11 17:01:01 +0300
commitcfd4cdb731750786f787b7aaea6a9f411caa5af2 (patch)
tree430a267cd9b818b50bac1da27dd7f1cac55384cb /layouts/partials/head/opengraph.html
parent3e18e165e0dbc10ea1e81c745a04ea7ae82c6e47 (diff)
feat(helper/image): new return format
Diffstat (limited to 'layouts/partials/head/opengraph.html')
-rw-r--r--layouts/partials/head/opengraph.html8
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 }}' />