From 488da01892fccd6724723288e02fffc8220e5c73 Mon Sep 17 00:00:00 2001
From: "C. Lente" <7017340+clente@users.noreply.github.com>
Date: Sat, 4 Mar 2023 16:36:06 -0300
Subject: Better social card logic
---
layouts/partials/social_card.html | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
(limited to 'layouts/partials/social_card.html')
diff --git a/layouts/partials/social_card.html b/layouts/partials/social_card.html
index 77bc251..8bf397f 100644
--- a/layouts/partials/social_card.html
+++ b/layouts/partials/social_card.html
@@ -13,7 +13,8 @@
)) }}
{{ $date := .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
-{{ $byline := (printf "%s | %s" ($.Param "author") $date) }}
+{{ $author := (default $.Site.Author.name ($.Param "author") ) }}
+{{ $byline := (printf "%s | %s" $author $date) }}
{{ $fg = $fg.Filter (images.Text $byline (dict
"font" $font
@@ -34,11 +35,7 @@
-{{- with .Params.images -}}
-{{- range first 6 . }}{{ end -}}
-{{- else -}}
-{{- end -}}
{{- if .IsPage }}
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
@@ -71,13 +68,9 @@
-{{- with .Params.images -}}
-
-
-{{ else -}}
-{{- end }}
+
{{ with .Site.Social.twitter -}}
@@ -95,11 +88,7 @@
{{ with .Lastmod }}{{ end}}
-{{- with .Params.images -}}
-{{- range first 6 . -}}{{ end -}}
-{{- else -}}
-{{- end -}}
--
cgit v1.2.3