Well, this is pretty maddening. Per template …

Well, this is pretty maddening. Per template debugging, by using printf "%#v" ., I can get my blog pages to output “a list of all the variables scoped to the current context”. I wanted to see if there were any variables tied specifically to the photos/ and archive/ pages that I could use to generate CSS selectors in order to customize those pages individually. Sure enough, there’s a Path:"photos" or a Path:"archive", depending. (These are variables set in config.json.) However, for the life of me I simply cannot figure out how to reference that variable in an if eq template tag in order to do what I need to do. Clearly, the variable is obtained by the debugger, but how do I grab it for template tag purposes? Not a single clue. I’ve tried everything that’s occured to me.


  1. I’ve asked in the Hugo forums, which is where I ultimately got an answer to a question I had early on when putting this site together.

Author: Bix

The unsupported use case of a mediocre, autistic midlife in St. Johns, Oregon —now with added global pandemic.