# Do index.md inherit type that matches the root section name?

**URL:** <https://discourse.gohugo.io/t/do-index-md-inherit-type-that-matches-the-root-section-name/38359>\
**Category:** support\
**Created:** [April 26, 2022, 8:56pm UTC](https://discourse.gohugo.io/t/do-index-md-inherit-type-that-matches-the-root-section-name/38359 "2022-04-26T20:56:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gagna](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/gagna/32/16793_2.png) [@gagna](https://discourse.gohugo.io/u/gagna)\
**Post date:** [April 26, 2022, 8:56pm UTC](https://discourse.gohugo.io/t/do-index-md-inherit-type-that-matches-the-root-section-name/38359/1 "2022-04-26T20:56:03Z")

</div>

Hi

I have this content:

```auto
content/about/index.it.md
content/about/index.en.md

```

Which I want to use with this layout:

```auto
/theme/my-theme/layouts/about/single.html

```

Assuming this:  
[https://gohugo.io/content-management/sections/#content-section-vs-content-type](https://gohugo.io/content-management/sections/#content-section-vs-content-type)

I suppose `about/index.it.md` will use `about` as type by default

How can I do it without setting _`type: about`_ on the pages 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:** [April 26, 2022, 9:01pm UTC](https://discourse.gohugo.io/t/do-index-md-inherit-type-that-matches-the-root-section-name/38359/2 "2022-04-26T21:01:17Z")

</div>

`about` is a leaf bundle at the root of the site. It is not a section. Its `.Type` defaults to `page`.

---

<div class="post-metadata">

**Author:** ![gagna](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/gagna/32/16793_2.png) [@gagna](https://discourse.gohugo.io/u/gagna)\
**Post date:** [April 27, 2022, 11:00am UTC](https://discourse.gohugo.io/t/do-index-md-inherit-type-that-matches-the-root-section-name/38359/3 "2022-04-27T11:00:48Z")

</div>

Thanks for your help

I linked the wrong documentation, this is the part that made me think that the `type` of index.md is sets by default to `about`: [https://gohugo.io/content-management/types/](https://gohugo.io/content-management/types/)

Also I found an issue on Github, someone someone with similar thought:  
[https://github.com/gohugoio/hugo/issues/5714](https://github.com/gohugoio/hugo/issues/5714)

The basic idea is to create the same folder structure as `content` inside the `layout` folder

Found another topic about this: [here](https://discourse.gohugo.io/t/single-template-lookup-revisited/16517)

Setting `type` in front matter seems the only solution

---

<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:** [April 27, 2022, 1:36pm UTC](https://discourse.gohugo.io/t/do-index-md-inherit-type-that-matches-the-root-section-name/38359/4 "2022-04-27T13:36:11Z")

</div>

Because its `.Type` is `page`, the lookup order is:

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

If you place `layout = "about"` in front matter, the lookup order will be:

1. layouts/page/about.html
2. layouts/\_default/about.html
3. layouts/page/single.html
4. layouts/\_default/single.html
