I handle debugging of such things by using a recursive partial.
I have a theme called hugo-bare-min-theme
designed solely for debug and development of Hugo sites. You don’t have to use the whole theme; copying just the debugprint.html
partial that I link in that project’s README (and debugprint.css
partial) would suffice.
Related: