jwogrady Work, evidence, and what I make of it
Lab note JRN 26-009done

Every tutorial I can find predates the directory I need

Hugo 0.146 flattened the layouts structure, and the old one still works, which is the problem.

Almost every Hugo tutorial says to put templates in layouts/_default/. Almost every Hugo tutorial is describing a structure that changed in 0.146.

The change

Tutorials say Actually
layouts/_default/baseof.html layouts/baseof.html
layouts/_default/single.html layouts/page.html
layouts/_default/list.html layouts/list.html
layouts/partials/ layouts/_partials/

Why this is nasty rather than merely annoying

  • _default/ still works.
  • Follow a three-year-old tutorial and you get a site that builds, renders and looks fine.
  • Nothing anywhere tells you that you’ve just learned a structure on its way out.

The old structure still works, which is why nobody tells you.

What I do now

  • I’m on 0.166.
  • hugo version before trusting any layout advice — including this entry, whose only real claim to credibility is the date on it.