Is there an easy way to display the template that a page is using? I wanted to add a template field to my human-readable sitemap page. Any ideas?
I have tried {{ .Template }} and some other things I found in the docs, but so far not much luck. It seems to me that would be a great method to have available.
Yeah all the code and demos are still available for the debug bar (see the thread you linked to)
But yeah its not exactly “easy” and yes it does require hardcoding the template name into each layout - Hugo has no way (that I know of) of outputting the template being used or the lookup order.
If you don’t need to see the layout being used, you can put the debug bar in the baseof.html so only 1 partial which is much easier. But the layout and lookup order is the valuable part in my opinion.