From 30da421d7d8a58bb422cd6226cae9500c308c1d8 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Fri, 1 May 2026 16:41:16 +0700 Subject: [PATCH] fix(layouts): strip leading slash before relURL so subpath is honored Hugo's relURL/absURL on a leading-slash path treats it as root-absolute and skips the baseURL subpath. Strip the prefix first so user-supplied paths like '/images/avatar.svg' resolve correctly under https://*.github.io//. --- themes/bonsai/layouts/partials/bio-card.html | 2 +- themes/bonsai/layouts/partials/head.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/bonsai/layouts/partials/bio-card.html b/themes/bonsai/layouts/partials/bio-card.html index d6bfe9b..1cf3a20 100644 --- a/themes/bonsai/layouts/partials/bio-card.html +++ b/themes/bonsai/layouts/partials/bio-card.html @@ -6,7 +6,7 @@
{{- if $avatar }} - {{ $name }} + {{ $name }} {{- end }}

{{ $name }}

diff --git a/themes/bonsai/layouts/partials/head.html b/themes/bonsai/layouts/partials/head.html index a620a6f..be1e06f 100644 --- a/themes/bonsai/layouts/partials/head.html +++ b/themes/bonsai/layouts/partials/head.html @@ -20,8 +20,8 @@ {{- end }} - - + + {{- if site.Params.themeToggle }} - + {{- end }}