From 8e57a036d93d687dc4037891170cbdf2a0020e56 Mon Sep 17 00:00:00 2001
From: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Date: Sun, 8 Oct 2023 02:31:10 -0400
Subject: [PATCH] Adding missing title in header

---
 layouts/partials/head.html | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index ad29f159b..b6000465e 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -34,23 +34,29 @@
   {{else}}
     {{ $tags := .Params.tags}}
     {{ if .Params.social_image_url }}
-    {{ $socialURL := printf "https://flear.org/api/card?%s" (querify "title" .Title "imgUrl" .Params.social_image_url ) }}
+      {{ $socialURL := printf "https://flear.org/api/card?%s" (querify "title" .Title "imgUrl" .Params.social_image_url ) }}
       <meta name="twitter:image" {{ printf "content=%q" $socialURL |  safeHTMLAttr}}>
       <meta property="og:image" {{ printf "content=%q" $socialURL |  safeHTMLAttr}}>
-    {{else}}
+    {{else if .Title}}
       {{ $socialURL := printf "https://flear.org/api/card?%s" (querify "title" .Title) }}
       <meta name="twitter:image" {{ printf "content=%q" $socialURL |  safeHTMLAttr}}>
       <meta property="og:image" {{ printf "content=%q" $socialURL |  safeHTMLAttr}}>
+    {{ else }}
+      <meta name="twitter:image" content="/images/logo-header-light.png">
+      <meta property="og:image" content="/images/logo-header-light.png">
     {{end}}
   {{end}}
 
   {{ if .Title }}
+    <title>FLEAR: {{ .Title }}</title>
     <meta name="og:title" content="{{ .Title }}">
     <meta name="twitter:title" content="{{ .Title }}">
   {{ else if .Site.Title }}
+    <title>FLEAR: {{ .Site.Title }}</title>
     <meta name="og:title" content="{{.Site.Title}}">
     <meta name="twitter:title" content="{{.Site.Title}}">
   {{ else }}
+    <title>FLEAR - Free and Libre Engineers for Amateur Radio</title>
     <meta name="og:title" content="FLEAR - Free and Libre Engineers for Amateur Radio">
     <meta name="twitter:title" content="FLEAR - Free and Libre Engineers for Amateur Radio">
   {{end}}
-- 
GitLab