HUGO

Creating "custom" folder to organize custom layouts Hugo

Hey everybody, I had a quick question about layouts. I’ve figured out how to set a custom layout with front matter.

My question is based on the Lookup order it seems like layout front matter is closely tied to the Kind front matter.

My question is if it’s possible to create a folder for custom layouts that I can refer to without also needing to update Kind. If not does changing the Kind front matter affect the functionality of range?

I recommend you to read amazing guide from @pointyfar here, Template Lookup: A Guide.

  1. You can’t change .Kind
  2. But you can set .Type and .Layout via frontmatter

You can use Front Matter Cascade to help you set the .Type and .Layout of the children of section.

Ah yes my bad Type is what I was referring to. Thanks @pamubay