mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
chore(debug)!: enable debug mode based on environment and remove params.dev.debug config
This commit is contained in:
@@ -52,6 +52,7 @@ pnpm dev:docs
|
||||
> [!TIP]
|
||||
>
|
||||
> - Add `-e production` to the development command to check the production environment, e.g. `pnpm dev:test -e production`.
|
||||
> - Add `-e debug` to enable debug mode (if applicable), e.g. `pnpm dev:test -e debug`.
|
||||
> - For documentation-related theme changes, it is recommended to clone both `FixIt` and `fixit-docs` as sibling directories.
|
||||
|
||||
### Building
|
||||
|
||||
@@ -49,7 +49,3 @@ avatar = "https://lruihao.cn/images/avatar.jpg"
|
||||
|
||||
[params.mermaid]
|
||||
zenuml = "https://cdn.jsdelivr.net/npm/@mermaid-js/mermaid-zenuml/dist/mermaid-zenuml.esm.min.mjs"
|
||||
|
||||
[params.dev]
|
||||
enable = true
|
||||
debug = true
|
||||
|
||||
@@ -1243,8 +1243,6 @@ postFooterAfter = []
|
||||
enable = false
|
||||
# Check for updates
|
||||
c4u = false
|
||||
# FixIt 0.4.0 | NEW Enable debug mode
|
||||
debug = false
|
||||
|
||||
# Page config
|
||||
# TODO migrate mapping key to `params` layer in the future
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
@example
|
||||
{{- partial "_debug/dump.html" . -}}
|
||||
*/ -}}
|
||||
{{- $debug := (site.Store.Get "devOpts").debug -}}
|
||||
|
||||
{{- if $debug | and hugo.IsServer -}}
|
||||
{{- if eq hugo.Environment "debug" | and hugo.IsServer -}}
|
||||
<pre>{{ debug.Dump . }}</pre>
|
||||
{{- end -}}
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
@example
|
||||
{{- partial "_debug/template-call-stack.html" . -}}
|
||||
*/ -}}
|
||||
{{- $debug := (site.Store.Get "devOpts").debug -}}
|
||||
|
||||
{{- if $debug | and hugo.IsServer -}}
|
||||
{{- if eq hugo.Environment "debug" | and hugo.IsServer -}}
|
||||
{{- with templates.Current -}}
|
||||
<ul class="template-call-stack">
|
||||
{{- range .Ancestors -}}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
{{- $isRecursive := .isRecursive | default false -}}
|
||||
{{- $_ignoreList := slice ".DS_Store" "Thumbs.db" ".directory" ".git" "node_modules" "public" -}}
|
||||
{{- $ignoreList := .ignoreList | default slice | union $_ignoreList -}}
|
||||
{{- $_debug := (site.Store.Get "devOpts").debug -}}
|
||||
{{- $_debug := eq hugo.Environment "debug" | and hugo.IsServer -}}
|
||||
|
||||
{{- if $isRecursive -}}
|
||||
{{- if le $deep $level -}}
|
||||
|
||||
Reference in New Issue
Block a user