Home page templates

What determines the template used for the site home page?

From: Home templates | Hugo - I expect layout/_default/home.html.

What I am seeing: my site (which has content/_index.md) is using the theme’s layout/index.html, not the site’s layout/_default/home.html (as I would expect).

Is layout/index.html a replacement for _default/home.html?
Is there a reason to use one over the other?

(I guess I am stuck with index.html because that’s what the theme creator did)

Not a huge deal (since I know that index.html works, I can do what I need), but I am curious for the future…

https://gohugo.io/templates/lookup-order/#home-templates

These template paths are sorted by specificity in descending order. The least specific path is at the bottom of each list.

1 Like

Thank you!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.