ybbond

My site. The main domain
Log | Files | Refs | README | LICENSE | CC-LICENSE

commit 665a5cd18075d02292e9b585471d21dd5d4d45b9
parent e71edccf0c57758acddf3055d5f1673fd19ee64f
Author: Yohanes Bandung <bandungpenting@gmail.com>
Date:   Sat,  2 May 2020 16:18:04 +0700

hotfix: twitter metas image not found

Diffstat:
Mlayouts/partials/head/twitter-card-metas.html | 2+-

1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/layouts/partials/head/twitter-card-metas.html b/layouts/partials/head/twitter-card-metas.html
@@ -5,6 +5,6 @@
 <meta name="twitter:title" content="{{ cond .IsHome $titleHome $titleRest }}">
 <meta name="twitter:url" content="{{ .Permalink }}">
 <meta name="twitter:description" content="{{ cond .IsHome .Site.Params.Description (.Params.Twitter.Description | default $defaultDesc) }}">
-<meta name="twitter:image" content="{{ .Params.Twitter.Image | default (printf "%s%s" .Permalink .Params.Image.Src) | default "logo.png" | absURL }}">
+<meta name="twitter:image" content="{{ .Params.Twitter.Image | (cond (isset .Params.Image "src") (printf "%s%s" .Permalink .Params.Image.Src) nil) | default "logo.png" | absURL }}">
 <meta name="twitter:site" content="@{{ .Params.Twitter.Site | default .Site.Params.twitter }}">
 <meta name="twitter:creator" content="@{{ .Params.Twitter.Site | default .Site.Params.twitter }}">