mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
feat(devtools): add template call stack for debugging
This commit is contained in:
@@ -1187,6 +1187,8 @@ 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
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{{- /*
|
||||
Render template call stack for debugging purpose.
|
||||
Call the partial from any template: {{- partial "devtools/template-call-stack.html" . -}}
|
||||
*/ -}}
|
||||
{{- if .Site.Params.dev.debug | and hugo.IsServer -}}
|
||||
{{- with templates.Current -}}
|
||||
<ul class="template-call-stack">
|
||||
{{- range .Ancestors -}}
|
||||
<li><a href="vscode://file/{{ .Filename }}"><small>{{ .Filename }}</small></a></li>
|
||||
{{- with .Base -}}
|
||||
<li><a href="vscode://file/{{ .Filename }}"><small>{{ .Filename }}</small></a></li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- hugo.Store.Set "version" "v0.4.2-20260108093145-c257b9b1" -}}
|
||||
{{- hugo.Store.Set "version" "v0.4.2-20260109042944-8b5315a1" -}}
|
||||
{{- .Store.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
Reference in New Issue
Block a user