From 10e314e0495a3ff40097aefde0cd7a69ec80a0b2 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Fri, 16 Feb 2024 22:29:30 -0600 Subject: [PATCH] further opengraph tweaks --- layouts/partials/opengraph.html | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html index 16a06b6..b3e9d33 100644 --- a/layouts/partials/opengraph.html +++ b/layouts/partials/opengraph.html @@ -6,7 +6,6 @@ {{- if .IsHome }} - {{ $img := $base.Filter (images.Text .Site.Params.Description (dict "color" "#d8d8d8" "size" 64 @@ -16,11 +15,10 @@ "font" $font ))}} {{ $img = resources.Copy "og.png" $img }} - +{{ .Scratch.Set "og_image" $img }} {{- end }} {{- if .IsPage }} - {{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} {{ with .PublishDate }}{{ end }} @@ -34,19 +32,19 @@ "font" $font ))}} {{ $img = resources.Copy (path.Join .Page.RelPermalink "og.png") $img }} +{{ .Scratch.Set "og_image" $img }} +{{- end -}} +{{ $img := .Scratch.Get "og_image" }} + - - -{{- end -}} {{- with .Params.audio }}{{ end }} -{{- with .Params.locale }}{{ end }} {{- with .Site.Params.title }}{{ end }} {{- with .Params.videos }}{{- range . }}