Files
FixIt/layouts/_partials/devtools/template-call-stack.html
T
Cell fdfd772100 feat(File Tree): add file-tree shortcode support (#685)
* feat(File Tree): add `file-tree` shortcode support

* feat(file-tree): add ignoreList parameter to file-tree shortcode

* feat(file-tree): enhance file-tree shortcode with ignoreList and folderSlash options

* feat(file-tree): enhance file-tree shortcode to support data mode

* feat(file-tree): enhance file-tree shortcode to support file mode

* feat(file-tree): improve content parsing in file-tree shortcode

* feat(file-tree): improve root path validation and error handling in filesystem mode

* test(file-tree): add unit tests for `file-tree` shortcode

* feat(file-tree): add file-tree code block rendering support

* refactor(file-tree): extract filesystem scanning to get-file-tree partial

Move directory traversal and root path validation to a separate partial function,
consolidating all filesystem-related logic in one place. This simplifies the
shortcode implementation and ensures a unified data format for rendering.

* docs(readme): extend code fence and shortcode support for file tree in documentation

* feat(file-tree): add fullRootName parameter for root path display in file tree

* feat(file-tree): add language parameter to get-file-tree function

* feat(file-tree): add highlightList parameter for file-tree shortcode

* perf(file-tree): add level param for get-file-tree function to descend only level directories deep
2026-01-14 16:01:22 +08:00

19 lines
638 B
HTML

{{- /*
Render template call stack for debugging purpose.
Call the partial from any template: {{- partial "devtools/template-call-stack.html" . -}}
*/ -}}
{{- $debug := (site.Store.Get "devOpts").debug -}}
{{- if $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 -}}