From 44d68d9a5b67ba2e7409a3dff91fc6ef5847c230 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Mon, 17 Nov 2025 14:43:52 +0800 Subject: [PATCH] fix: theme configuration failed to be retrieved for articles with Chinese paths resolve #656 --- layouts/_partials/assets.html | 3 +++ layouts/_partials/init/index.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/layouts/_partials/assets.html b/layouts/_partials/assets.html index 547abf9e..4ccc36ab 100644 --- a/layouts/_partials/assets.html +++ b/layouts/_partials/assets.html @@ -20,6 +20,9 @@ FixIt theme assets partial {{- $config = dict "version" (hugo.Store.Get "version") | merge $config -}} {{- $author := partial "function/get-author-map.html" .Params.author -}} {{- $noBaseRelPermalink := strings.TrimPrefix (relURL "") $.RelPermalink -}} +{{- with .File -}} + {{- $noBaseRelPermalink = replace $noBaseRelPermalink (.BaseFileName | urlize) .BaseFileName -}} +{{- end -}} {{- /* Search */ -}} {{- if .Site.Params.search | and .Site.Params.search.enable -}} diff --git a/layouts/_partials/init/index.html b/layouts/_partials/init/index.html index b475ee6b..2e71e83e 100644 --- a/layouts/_partials/init/index.html +++ b/layouts/_partials/init/index.html @@ -1,4 +1,4 @@ -{{- hugo.Store.Set "version" "v0.4.0-alpha.2-20251117025418-de3b2340" -}} +{{- hugo.Store.Set "version" "v0.4.0-alpha.2-20251117064353-63655b30" -}} {{- .Store.Set "this" dict -}} {{- partial "init/detection-env.html" . -}}