# Which template does content/aaa/index.md correspond to?

**URL:** <https://discourse.gohugo.io/t/which-template-does-content-aaa-index-md-correspond-to/45703>\
**Category:** support\
**Created:** [August 10, 2023, 1:58pm UTC](https://discourse.gohugo.io/t/which-template-does-content-aaa-index-md-correspond-to/45703 "2023-08-10T13:58:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wang1](https://avatars.discourse-cdn.com/v4/letter/w/91b2a8/32.png) [@wang1](https://discourse.gohugo.io/u/wang1)\
**Post date:** [August 10, 2023, 1:58pm UTC](https://discourse.gohugo.io/t/which-template-does-content-aaa-index-md-correspond-to/45703/1 "2023-08-10T13:58:45Z")

</div>

I have tried creating the following templates to no avail

layouts/aaa/index.html  
layouts/aaa/single.html  
layouts/aaa.html

---

<div class="post-metadata">

**Author:** ![razon](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/razon/32/14882_2.png) [@razon](https://discourse.gohugo.io/u/razon)\
**Post date:** [August 10, 2023, 2:46pm UTC](https://discourse.gohugo.io/t/which-template-does-content-aaa-index-md-correspond-to/45703/2 "2023-08-10T14:46:21Z")

</div>

According to the [Hugo Lookup Order](https://gohugo.io/templates/lookup-order/):

1. layouts/aaa/single.html.html
2. layouts/aaa/single.html
3. layouts/\_default/single.html.html
4. layouts/\_default/single.html

Btw, do you specify the `layout` in front matter?

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [August 10, 2023, 3:15pm UTC](https://discourse.gohugo.io/t/which-template-does-content-aaa-index-md-correspond-to/45703/3 "2023-08-10T15:15:12Z")

</div>

This is a leaf bundle, not a section, so without `layout` or `type` in front matter the lookup order is:

1. layouts/page/single.html (applies to all single pages in content root)
2. layouts/\_default/single.html

If you set `type` in front matter to `about`, the lookup order becomes:

1. layouts/about/single.html
2. layouts/\_default/single.html

---

<div class="post-metadata">

**Author:** ![wang1](https://avatars.discourse-cdn.com/v4/letter/w/91b2a8/32.png) [@wang1](https://discourse.gohugo.io/u/wang1)\
**Post date:** [August 10, 2023, 3:33pm UTC](https://discourse.gohugo.io/t/which-template-does-content-aaa-index-md-correspond-to/45703/4 "2023-08-10T15:33:33Z")

</div>

Thank you for your reply! I already know that index.md is just a regular page, and the template it uses is single.html or single.html.html

Now I find that after there is an index.md file in the aaa/ directory, if I add other articles such as: bbb.md, it will not be able to open. Is it true that as long as there is index.md, other articles cannot be added?

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [August 10, 2023, 3:37pm UTC](https://discourse.gohugo.io/t/which-template-does-content-aaa-index-md-correspond-to/45703/5 "2023-08-10T15:37:47Z")

</div>

> [@wang1](#):
>
> Is it true that as long as there is index.md, other articles cannot be added?

Yes. I just answered this question, again, in another thread:

> Use an \_index.md file to tell Hugo, “This directory is a section (branch bundle) that (probably) has member pages or subsections.” Use an index.md file to tell Hugo, “This is a just a page (leaf bundle), and it has no descendants.”

[https://gohugo.io/content-management/page-bundles/](https://gohugo.io/content-management/page-bundles/)
