Keeping html output tidy

I’ve been trying to design my templates in a way that the output of the html is nicely indented, but this seems like an impossible task. Especially if you want to keep the templates tidy as well.

The biggest problem is when you indent a partial include tag, only the first line of the partial is indented.
Not indenting the partial, and indenting everything in the partial seems like the cleanest way to solve this at the moment.

Is there a way/fix this indenting behaviour of the partials? Basically I want to have everything from a partial indented if you have it indented in the parent template, not only the first line…

thanks

It could be difficult to maintain to keep track of all tabs, spaces and new lines in each template. The easiest way would be to use a task runner like Grunt or Gulp. They’ve plugins that will “prettify” content automatically garuanteed without having to worry about your raw templates. The plugins just need to run over the generated output of Hugo. Those taskrunners can do this even automatically I’ve you add a file watcher.