Geoffrey Garrett
2022-06-27 b732293f65999e9a1d3a40a5ddeccf53a385b1f3
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.
1 files modified
2 ■■■ changed files
layouts/partials/head.html 2 ●●● patch | view | raw | blame | history
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 }}