hugo-debug-drawer
is a Hugo Theme Component to help debug your Hugo site templates.
Install as a theme component.
Call the debugdrawer
partial from somewhere in your main theme's layouts.
Optionally, pass configuration object.
{{ $options := dict "debugdrawerpanelheight" "500px" "bugcolor" "#000000" "bugbg" "#00C09B" "hidefromdepth" 5 }}
{{ partial "debugdrawer.html" (dict "context" . "options" $options ) }}
Add layout information to your template files by including this .Scratch
variable to your layout files:
{{ .Scratch.Set "debugdrawerlayout" "layouts/index.html" }}
debugdrawerpanelheight
- Specify the panel's height. Default
300px
.
bugcolor
- Specify the foreground color of the bug icon. Default
#FFFFFF
.
bugbg
- Specify the background color of the bug icon. Default
#A62639
.
hidefromdepth
- Specify at what depth to hide the elements. Default
5
.
defaultopen
- Specify whether the panel is open by default. Default
false
.
See Demo Source and Demo Site.
See hidefromdepth
at work here: open Page
Params panel.
MIT