diff --git a/layouts/_partials/assets.html b/layouts/_partials/assets.html
index 788b7acb..db962818 100644
--- a/layouts/_partials/assets.html
+++ b/layouts/_partials/assets.html
@@ -323,17 +323,17 @@ FixIt theme assets partial
{{- if hugo.IsServer -}}
{{- $configJS = add $configJS "console.log('Page config:', window.config);" -}}
{{- end -}}
-{{- $targetPath := relLangURL "/js/config/page.js" -}}
-{{- if in .Site.RegularPages .Page -}}
- {{- $targetPath = $noBaseRelPermalink | printf "%s/config/page.js" -}}
+{{- $targetPath := $noBaseRelPermalink | printf "%s/config/page.js" -}}
+{{- if (path.Ext .Page.RelPermalink) -}}
+ {{- $targetPath = "" -}}
{{- end -}}
{{- dict "Content" $configJS "Path" $targetPath "Defer" true | dict "Page" . "Data" | partial "store/script.html" -}}
{{- /* MathJax plugin */ -}}
{{- if .Store.Get "hasMathJax" -}}
- {{- $targetPath := relLangURL "/js/lib/mathjax.min.js" -}}
- {{- if in .Site.RegularPages .Page -}}
- {{- $targetPath = $noBaseRelPermalink | printf "%s/mathjax.min.js" -}}
+ {{- $targetPath := $noBaseRelPermalink | printf "%s/mathjax.min.js" -}}
+ {{- if (path.Ext .Page.RelPermalink) -}}
+ {{- $targetPath = "" -}}
{{- end -}}
{{- $options := dict "targetPath" $targetPath "minify" hugo.IsProduction -}}
{{- if not hugo.IsProduction -}}
diff --git a/layouts/_partials/init/index.html b/layouts/_partials/init/index.html
index 950e11c7..432f8fb0 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-20251014082535-5c74d431" -}}
+{{- hugo.Store.Set "version" "v0.4.0-alpha.2-20251022034748-fe129dd2" -}}
{{- .Store.Set "this" dict -}}
{{- partial "init/detection-env.html" . -}}
diff --git a/layouts/_partials/plugin/post-chat-ai.html b/layouts/_partials/plugin/post-chat-ai.html
index a88431d9..3b44bc92 100644
--- a/layouts/_partials/plugin/post-chat-ai.html
+++ b/layouts/_partials/plugin/post-chat-ai.html
@@ -100,9 +100,9 @@
{{- end -}}
{{- /* Insert config */ -}}
- {{- $targetPath := relLangURL "/js/config/post-chat.js" -}}
- {{- if in .Site.RegularPages .Page -}}
- {{- $targetPath = (strings.TrimPrefix (relURL "") $.RelPermalink) | printf "%s/config/post-chat.js" -}}
+ {{- $targetPath := (strings.TrimPrefix (relURL "") $.RelPermalink) | printf "%s/config/post-chat.js" -}}
+ {{- if (path.Ext .Page.RelPermalink) -}}
+ {{- $targetPath = "" -}}
{{- end -}}
{{- dict "Content" $configJS "Path" $targetPath "Defer" true | dict "Page" . "Data" | partial "store/script.html" -}}