mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
feat(deprecated): project config key languageCode was deprecated in Hugo v0.158.0 and will be removed in a future release. Use locale instead.
https://gohugo.io/methods/site/language/ https://gohugo.io/methods/page/language/ https://gohugo.io/configuration/languages/
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{{- $cjk := slice "zh-cn" "zh-tw" "ja" "ko" -}}
|
||||
{{- $isCJK := (in $cjk .Page.Language.Lang) | default .Page.Params.IsCJKLanguage -}}
|
||||
{{- $isCJK := (in $cjk .Page.Language.Name) | default .Page.Params.IsCJKLanguage -}}
|
||||
|
||||
{{- return $isCJK -}}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{{- if ne .Site.Params.dev.enable true -}}
|
||||
{{- .Site.Store.Set "devOpts" dict -}}
|
||||
{{- end -}}
|
||||
{{- if eq .Site hugo.Sites.Default -}}
|
||||
{{- if .Site.Language.IsDefault -}}
|
||||
{{- warnf "FixIt %v\n%v\n\n" (hugo.Store.Get "version") (T "init.devEnvWarn") -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{{- if and (eq .Site hugo.Sites.Default) .Site.Params.search.enable (eq .Site.Params.search.type "pagefind") (not (fileExists "public/pagefind")) -}}
|
||||
{{- if and .Site.Language.IsDefault .Site.Params.search.enable (eq .Site.Params.search.type "pagefind") (not (fileExists "public/pagefind")) -}}
|
||||
{{- warnf "[FixIt] Pagefind search index not found.\nRun `npx pagefind --site public` in the site root directory after building.\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- /* FixIt theme version detection */ -}}
|
||||
{{- if eq .Site hugo.Sites.Default -}}
|
||||
{{- if .Site.Language.IsDefault -}}
|
||||
{{- if not .Site.Params.version -}}
|
||||
{{- errorf "FixIt %v\n%v\n\n" $version (T "init.configurationError") -}}
|
||||
{{- else if gt "0.2.0" (strings.TrimPrefix "v" .Site.Params.version) -}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- hugo.Store.Set "version" "v1.0.0-mrizf1fk" -}}
|
||||
{{- hugo.Store.Set "version" "v1.0.0-mrj0ikh7" -}}
|
||||
{{- .Store.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
Reference in New Issue
Block a user