# Cannot generate content/foo/\_index.md

**URL:** <https://discourse.gohugo.io/t/cannot-generate-content-foo-index-md/10185>\
**Category:** support\
**Created:** [January 25, 2018, 1:45pm UTC](https://discourse.gohugo.io/t/cannot-generate-content-foo-index-md/10185 "2018-01-25T13:45:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![1000ch](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/1000ch/32/1224_2.png) [@1000ch](https://discourse.gohugo.io/u/1000ch)\
**Post date:** [January 25, 2018, 1:45pm UTC](https://discourse.gohugo.io/t/cannot-generate-content-foo-index-md/10185/1 "2018-01-25T13:45:13Z")

</div>

Using hugo v0.34, as [https://gohugo.io/content-management/organization/](https://gohugo.io/content-management/organization/), `content/foo/_index.md` will generate `public/foo/index.html` without special setting. But I don’t know why [this repo](https://github.com/openfresh/a11y-guidelines) does not generate.

---

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [January 25, 2018, 2:53pm UTC](https://discourse.gohugo.io/t/cannot-generate-content-foo-index-md/10185/2 "2018-01-25T14:53:17Z")

</div>

did you try to remove the “layout: single” part in the [index.md](http://index.md)? maybe hugo gets confused about templates. the “single” name is kind of a “reserved variable”.

---

<div class="post-metadata">

**Author:** ![1000ch](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/1000ch/32/1224_2.png) [@1000ch](https://discourse.gohugo.io/u/1000ch)\
**Post date:** [January 25, 2018, 3:01pm UTC](https://discourse.gohugo.io/t/cannot-generate-content-foo-index-md/10185/3 "2018-01-25T15:01:45Z")

</div>

Thank you for advise 👍  
Tried followings, but got same results.

- Removed `layout: single` to refer `layouts/_default/single.html` as you say
- Created `layouts/_defaults/player.html` copied from `single.html` and specified `layout: player`

---

<div class="post-metadata">

**Author:** ![maiki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maiki/32/16384_2.png) [@maiki](https://discourse.gohugo.io/u/maiki)\
**Post date:** [January 25, 2018, 10:29pm UTC](https://discourse.gohugo.io/t/cannot-generate-content-foo-index-md/10185/4 "2018-01-25T22:29:42Z")

</div>

@1000ch, when you use `_index.md`, the page use a [list template](https://gohugo.io/templates/lists/#list-defaults). I suggest you get a page rendering with the templates mentioned in those docs.

Get that working before you choose a `layout` for the page. It will be easier to debug, because right now I only see a `single.html`, so we can’t be sure where the issue is.

---

<div class="post-metadata">

**Author:** ![1000ch](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/1000ch/32/1224_2.png) [@1000ch](https://discourse.gohugo.io/u/1000ch)\
**Post date:** [January 30, 2018, 4:10am UTC](https://discourse.gohugo.io/t/cannot-generate-content-foo-index-md/10185/5 "2018-01-30T04:10:05Z")

</div>

@maiki  
To use A Page Rendering, still getting no `player/index.html` when I created `layouts/player/single.html` (same as `layouts/_default/single.html`).

---

<div class="post-metadata">

**Author:** ![maiki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maiki/32/16384_2.png) [@maiki](https://discourse.gohugo.io/u/maiki)\
**Post date:** [January 30, 2018, 4:22am UTC](https://discourse.gohugo.io/t/cannot-generate-content-foo-index-md/10185/6 "2018-01-30T04:22:41Z")

</div>

I think you need to start from scratch so you understand the template order. If you are having issues getting any template to show, then you can not proceed.

So focus on getting a template to render in a simple example, such as a single piece of content, and then modify it to fit your need.

---

<div class="post-metadata">

**Author:** ![1000ch](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/1000ch/32/1224_2.png) [@1000ch](https://discourse.gohugo.io/u/1000ch)\
**Post date:** [January 30, 2018, 4:46am UTC](https://discourse.gohugo.io/t/cannot-generate-content-foo-index-md/10185/7 "2018-01-30T04:46:41Z")

</div>

Finally I got a bug(?) detail. It seems that template things such as order, specifier, place are not problem.

When I execute `hugo serve`, `content/player/index.md` is not parsed at first. But when I edit `content/player/index.md`, `public/player/index.html` is created as usual and live-reloaded.

Still I don’t know why `content/player/index.md` is not a target of hugo from the beginning.

---

<div class="post-metadata">

**Author:** ![kaushalmodi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/kaushalmodi/32/2567_2.png) [@kaushalmodi](https://discourse.gohugo.io/u/kaushalmodi)\
**Post date:** [January 30, 2018, 4:54am UTC](https://discourse.gohugo.io/t/cannot-generate-content-foo-index-md/10185/8 "2018-01-30T04:54:05Z")

</div>

I believe this is the same issue as this:

> <https://github.com/gohugoio/hugo/issues/4332>

which is already fixed in the dev version (`master` branch). So it will be available in the next (v0.35) release soon.
