www.eamoncaddigan.net

Content and configuration for https://www.eamoncaddigan.net
git clone https://git.eamoncaddigan.net/www.eamoncaddigan.net.git
Log | Files | Refs | Submodules | README

commit 17ed90d46893f4b7d86a3289e98449c565b646d6
parent 1351f7b0cedb249035ac9198430e1653ad74958a
Author: Eamon Caddigan <eamon.caddigan@gmail.com>
Date:   Sun,  1 Dec 2024 14:18:22 -0800

Add Open Graph metadata to page head

Diffstat:
Mlayouts/partials/hook_head_end.html | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/layouts/partials/hook_head_end.html b/layouts/partials/hook_head_end.html @@ -1,3 +1,12 @@ <link rel="stylesheet" type="text/css" href="{{relURL "css/extra.css"}}"> -{{ if .Params.katex}}{{ partial "katex.html" . }}{{ end }} +{{ if .Params.katex }}{{ partial "katex.html" . }}{{ end -}} <link rel="alternate" type="application/rss+xml" href="{{relURL "posts/index.xml"}}"> +{{ $title := print .Site.Title " | " .Title -}} +{{ if .IsHome }}{{ $title = .Site.Title }}{{ end -}} +<meta property="og:title" content="{{ $title }}" /> +<meta property="og:type" content="website" /> +<meta property="og:url" content="{{ .Permalink }}" /> +{{ with .Site.Params.card -}} +<meta property="og:image" content="{{ absURL . }}" /> +{{ end -}} +<meta property="og:description" content="{{ .Params.Description }}">