Update og:image template to render to absolute URL

Pages with no specified og:image will use `.Site.BaseURL` appended with `img/Jafner.dev.logo.png`

Pages with specified og:image will use `.Permalink` appended with the specified image.
This commit is contained in:
Joey Hafner 2024-06-30 23:41:43 -07:00
parent d1c1a55a1e
commit 5acc44461c

View File

@ -31,5 +31,5 @@
<meta property="og:url" content="{{ .Permalink }}">
<meta property="article:author" content="Joey Hafner">
<meta property="og:image" content="{{ if .Page.Params.ogimage }}{{ .Page.Params.ogimage }}{{ else }}/img/Jafner.dev.logo.png{{ end }}">
<meta property="og:image" content="{{ if .Page.Params.ogimage }}{{ .Permalink }}{{ .Page.Params.ogimage }}{{ else }}{{ .Site.BaseURL }}img/Jafner.dev.logo.png{{ end }}">
<meta name="og:site_name" content="Jafner.dev"/>