From 87e01d32a08d7679ea71a4910c41249f8761b789 Mon Sep 17 00:00:00 2001
From: Geoffrey Garrett <g.h.garrett13@gmail.com>
Date: Tue, 28 Jun 2022 01:21:22 +0200
Subject: [PATCH] fix(head.html): Adds robustness to `config.yaml` favicon
 definitions

Initially assumed that `href` definitions should have `/...` as their
pattern, and `baseURL` would always end with `/`, however the omission
of `/` as the prefix of the former and suffix of the latter
simultaneously, would result in broken favicon paths. Final comment:
`..///...` is not breaking, which is worst case scenario with this fix.
---
 layouts/partials/head.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 7b8bb4e..d33a0c7 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -18,7 +18,7 @@
   {{ $favicon | safeHTML }}
   {{ else }}
   {{ range $favicon }}
-  <link rel="{{.rel}}" {{if .type}}type="{{.type}}"{{end}} {{if .sizes}}sizes="{{.sizes}}"{{end}} href="{{$.Site.BaseURL}}{{.href}}" />
+  <link rel="{{.rel}}" {{if .type}}type="{{.type}}"{{end}} {{if .sizes}}sizes="{{.sizes}}"{{end}} href="{{$.Site.BaseURL}}/{{.href}}" />
   {{- end }}
   {{ end }}