mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 23:38:56 +00:00
⚗️ Chore: preprocessing developer options
This commit is contained in:
@@ -1166,7 +1166,6 @@ enableEmoji = true
|
||||
# Developer options since v0.2.15
|
||||
# 开发者选项 since v0.2.15
|
||||
[params.dev]
|
||||
# TODO 提前处理 如果 dev.enable = false 那其他值全部清空,避免后续使用时判断条件过多
|
||||
enable = false
|
||||
# Check for updates
|
||||
# 检查更新
|
||||
|
||||
@@ -21,6 +21,12 @@
|
||||
{{- else if eq .Params.comment false -}}
|
||||
{{- .Scratch.Set "comment" dict -}}
|
||||
{{- end -}}
|
||||
{{- else if eq .Site .Sites.First -}}
|
||||
{{- warnf "FixIt %v\n%v\n\n" (.Scratch.Get "version") (T "devEnvWarn") -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- .Scratch.Set "devOpts" .Site.Params.dev -}}
|
||||
{{- if ne .Site.Params.dev.enable true -}}
|
||||
{{- .Scratch.Set "devOpts" dict -}}
|
||||
{{- end -}}
|
||||
{{- if eq .Site .Sites.First -}}
|
||||
{{- warnf "FixIt %v\n%v\n\n" (.Scratch.Get "version") (T "devEnvWarn") -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{{- $version := "v0.2.15-RC" -}}
|
||||
{{- $version := .Scratch.Get "version" -}}
|
||||
{{- $latest := $version -}}
|
||||
{{- $devOpts := .Scratch.Get "devOpts" -}}
|
||||
|
||||
{{- /* Check for updates */ -}}
|
||||
{{- if $devOpts.enable | and $devOpts.c4u -}}
|
||||
{{- if $devOpts.c4u -}}
|
||||
{{- /* Select the scope named "public_repo" to generate personal access token */ -}}
|
||||
{{- $header := dict "Authorization" "" -}}
|
||||
{{- with $devOpts.githubtoken -}}
|
||||
@@ -27,5 +27,4 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- .Scratch.Set "version" $version -}}
|
||||
{{- .Scratch.Set "latest" $latest -}}
|
||||
@@ -1,9 +1,9 @@
|
||||
{{- .Scratch.Set "version" "v0.2.15-RC" -}}
|
||||
{{- .Scratch.Set "params" (.Params | merge .Site.Params.page) -}}
|
||||
{{- .Scratch.Set "devOpts" (.Site.Params.dev | default dict) -}}
|
||||
{{- .Scratch.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-version.html" . -}}
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
{{- partial "init/detection-version.html" . -}}
|
||||
{{- partial "init/detection-deprecated.html" . -}}
|
||||
{{- partial "init/patch.html" . -}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user