A Hugo 'debug table' module

I got really inspired by this comment by @zwbetz:

I’ve now got a Hugo module (so others can easily incorporate into their themes from a canonical source, rather than the problem of copying the code as boilerplate and the associate divergence) that implements the original idea only, I think, better.

Hope you like it!


FYI I’ve done a ‘bunch’ more work on this, and like the results. I’ve parameterized the the table generation so that hopefully it will be easier to add/remove fields as Hugo gains/loses variables. In addition I’ve added classes to the html elements and created a basic static CSS for testing. I think the test CSS actually improves the readability of nested tables (by ‘popping’ them up and enlarging when opened).

Hopefully I can now be satisfied enough with this that I actually get back to the theme I was originally working on…

1 Like

@cshoredaniel This looks really great!

I worked on something similar awhile back - GitHub - JugglerX/hugo-debug-bar: Prototype debug bar for Hugo themes

I have not looked at this in awhile, but maybe there will be something useful there.

1 Like

Thank you, and sorry for taking so long to respond (I’m working on updating the exitwp-for-hugo Python script for Python 3 to move my WordPress sites to Hugo; the script also was rather dated and wasn’t doing everything I want). I’m definitely interested in taking a look to see if there is useful stuff there.