mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-25 07:48:54 +00:00
fix: ensure that the config of each page is unique
This commit is contained in:
@@ -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 -}}
|
||||
|
||||
@@ -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" . -}}
|
||||
|
||||
@@ -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" -}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user