Can layouts inherit other layouts like the do in Jekyll? I feel strange creating so many different layouts that have essentially the same bones (partials including head, header, footer), but with different content injected into the body.
Including the same partials in all of my layouts seems to violate DRY. Is there something I’m missing to get around this, or is by design?
I hate to draw comparisons w/Jekyll because in only a day or two I’ve found Hugo to be far superior.
I am excited enough about blocks that I would be willing to take a stab at it—I can’t get to it for a week or two though maybe. Were you thinking just another section in the Go Template Primer?
Yes that makes sense. You may get some inspiration/copy-and-paste from the Ace templates docs, as the logic for picking the base template is identical.
You can actually get around this by not using single.html and list.html for your type layouts. I use block.html instead and put only the block div (BEM methodology) only into the html template file. Then I do as much as I can to use the layout/_default and render the block view instead of repeating the same header and footer stuff on all the layouts. I find rendering views of blocks in this way a much more sustainable approach since it favors composition over inheritance.