# Improved documentation on layout Lookup Order - what do you think?

**URL:** <https://discourse.gohugo.io/t/improved-documentation-on-layout-lookup-order-what-do-you-think/40367>\
**Category:** feature\
**Tags:** documentation\
**Created:** [September 4, 2022, 12:10pm UTC](https://discourse.gohugo.io/t/improved-documentation-on-layout-lookup-order-what-do-you-think/40367 "2022-09-04T12:10:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgasparri](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dgasparri/32/17005_2.png) [@dgasparri](https://discourse.gohugo.io/u/dgasparri)\
**Post date:** [September 4, 2022, 12:10pm UTC](https://discourse.gohugo.io/t/improved-documentation-on-layout-lookup-order-what-do-you-think/40367/1 "2022-09-04T12:10:40Z")

</div>

Hi all,

I found the documentation about naming/ordering of template files rather obscure, so I tried to improve it.

Also I found a few posts on the forum asking how to name template files:

- [My experiences with Hugo’s template lookup order](https://discourse.gohugo.io/t/my-experiences-with-hugos-template-lookup-order/9959)
- [How does hugo know which layout to use?](https://discourse.gohugo.io/t/how-does-hugo-know-which-layout-to-use/14069)

The topic is complex, so I tried to put it all together in a (I hope) clear way providing also an example.

Proposed doc page (preview):

> **[Hugo's Lookup Order](https://deploy-preview-1805--gohugoio.netlify.app/templates/lookup-order/)**
>
> Hugo searches for the layout to use for a given page in a well defined order, starting from the most specific.

Original doc page: [Hugo's Lookup Order | Hugo](https://gohugo.io/templates/lookup-order/)

What do you think? Suggestions? Here is the pull request [Better explanation of Kind, Session, Type, Layout on final layout path by dgasparri · Pull Request #1805 · gohugoio/hugoDocs · GitHub](https://github.com/gohugoio/hugoDocs/pull/1805)

Duccio

---

<div class="post-metadata">

**Author:** ![tut](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tut](https://discourse.gohugo.io/u/tut)\
**Post date:** [November 26, 2022, 2:44pm UTC](https://discourse.gohugo.io/t/improved-documentation-on-layout-lookup-order-what-do-you-think/40367/2 "2022-11-26T14:44:31Z")

</div>

> <https://github.com/gohugoio/hugoDocs/pull/1805#issuecomment-1312396763>
>
> You obviously put a lot of work into this, but it is way too long and difficult …to read. I tried to read it several times using the Netlfiy preview site, but my eyes just glazed over. In addition to being too long and dense, this syntax makes it really difficult to read:
> 
> \- \`\<LAYOUT\>\` (11 instances)
> \- \`\<ROOT FOLDER\>\` (10 instances)
> \- \`\<THEME\>\` (6 instances)
> \- etc.
> 
> This page needs to have a \_brief\_ introduction, lookup tables, and perhaps some simple examples at the bottom of the page. Users commonly want to know answers to these simple questions:
> \- Where do I put a template to override the list view for my posts?
> \- Where do I put a template to override the page view for my posts?
> \- Where do I put a template to override my home page?
> \- Where do I put a template to override my taxonomy pages?
> \- Where do I put a template to override my term pages?
> 
> I think your detailed explanation is better suited to a blog post or a "tips and tricks" article somewhere.
