summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangeeth Sudheer <git@sangeeth.dev>2025-04-26 09:19:31 +0530
committerSangeeth Sudheer <git@sangeeth.dev>2025-04-26 09:37:17 +0530
commit1790b5684ca8da26894dcb5d0cd7c12163f08a61 (patch)
tree3b3f77a702f81225c968a05eff9e1adee213269a
parentc782f5cfc2f06b86cd2900c9381262f41ebf67da (diff)
Include og-image.html in all pages
Not sure why I added those checks earlier, but it's good to have og-image.html in all pages, like sections for tags/content categories.
-rw-r--r--layouts/partials/opengraph.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html
index 94176db..d770df1 100644
--- a/layouts/partials/opengraph.html
+++ b/layouts/partials/opengraph.html
@@ -52,8 +52,8 @@
as using an external service.
*/ -}}
- {{- if (and (or .IsHome .IsPage) (templates.Exists "partials/head/og-image.html")) }}
- {{- $ogImage := partial "head/og-image.html" . }}
+ {{- if templates.Exists "partials/head/og-image.html" }}
+ {{- $ogImage := partial "head/og-image.html" . | strings.TrimSpace }}
{{- with $ogImage }}
<meta property="og:image" content="{{ . }}">
{{- end }}