Respect base URL for nav logo; prefer logo.svg over favicon.svg

Reference the navbar brand image through relURL so it resolves
correctly when the site is served from a non-root base URL. Use
static/img/logo.svg when present, falling back to img/favicon.svg.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-02 09:44:44 +02:00
co-authored by Claude Sonnet 5
parent fc8023961a
commit 55308f7703
+3 -1
View File
@@ -1,7 +1,9 @@
<nav class="navbar navbar-expand-lg navbar-light bg-light sticky-top"> <nav class="navbar navbar-expand-lg navbar-light bg-light sticky-top">
<div class="container"> <!-- Changed from container-fluid to container --> <div class="container"> <!-- Changed from container-fluid to container -->
<a class="navbar-brand fw-bold" href="{{ .Site.BaseURL }}"> <a class="navbar-brand fw-bold" href="{{ .Site.BaseURL }}">
<img src="/img/favicon.svg" alt="{{ .Site.Title }}" title="{{ .Site.Title }}"> {{- $logo := "img/favicon.svg" -}}
{{- if os.FileExists "static/img/logo.svg" -}}{{- $logo = "img/logo.svg" -}}{{- end -}}
<img src="{{ $logo | relURL }}" alt="{{ .Site.Title }}" title="{{ .Site.Title }}">
</a> </a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" <button class="navbar-toggler" type="button" data-bs-toggle="collapse"