# Hugo rendering issue - Theme, Forty

**URL:** <https://discourse.gohugo.io/t/hugo-rendering-issue-theme-forty/12308>\
**Category:** support\
**Created:** [June 6, 2018, 4:47pm UTC](https://discourse.gohugo.io/t/hugo-rendering-issue-theme-forty/12308 "2018-06-06T16:47:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![marmara34](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/marmara34/32/5424_2.png) [@marmara34](https://discourse.gohugo.io/u/marmara34)\
**Post date:** [June 6, 2018, 4:47pm UTC](https://discourse.gohugo.io/t/hugo-rendering-issue-theme-forty/12308/1 "2018-06-06T16:47:58Z")

</div>

This is an annoying issue I have been trying to deal with for over a week. I have made some custom changes to the theme using page bundle instructions to have list page links inside another link page like;

Main Page  
Link to the Fruits page  
-Fruits (list page)  
–Red Fruits (list page)  
—Apple  
—Strawberry  
–Yellow Fruits (list page)  
—Banana  
—Melon

Ever since I am having trouble with Hugo rendering the pages. Whenever I start to work on my site to develop it and refresh the page (offline) to see the change i made, hugo is having trouble rendering the list pages correctly. If it renders “Red Fruits” page correctly, it will render “Yellow Fruits” page incorrectly. And sometimes it renders both correctly. This happens no matter in which section of the template I am working on.

Incorrect (No items on the list)  
 ![wrong](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/2X/6/6d941da0718cd5f1c29d3a5c188729c4f7bc49a2.jpg)  
Correct (items can be seen on the list)  
 ![right](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/2X/7/7b56581406f9cf98895ed7a5775bf5200bf359a2.jpg)

[Link to my hugo raw files](https://github.com/ozanweb/hugo_help)

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [June 6, 2018, 6:59pm UTC](https://discourse.gohugo.io/t/hugo-rendering-issue-theme-forty/12308/2 "2018-06-06T18:59:52Z")

</div>

There is no Hugo site in the repo you linked to.

To have a better idea of what is the nature of the problem we _need_ to have a look at your project’s source.

---

<div class="post-metadata">

**Author:** ![marmara34](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/marmara34/32/5424_2.png) [@marmara34](https://discourse.gohugo.io/u/marmara34)\
**Post date:** [June 6, 2018, 8:51pm UTC](https://discourse.gohugo.io/t/hugo-rendering-issue-theme-forty/12308/3 "2018-06-06T20:51:43Z")

</div>

Sorry, internet problem. Uploaded

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [June 7, 2018, 8:02am UTC](https://discourse.gohugo.io/t/hugo-rendering-issue-theme-forty/12308/4 "2018-06-07T08:02:35Z")

</div>

I saw your repo and I suppose you are referring to your `/plant_protection/`section that has this sample structure:

```auto
plant_protection
          └── _index.md
          └── fungicide.md
          └── fungicide
               └── _index.md
               └── several markdown content pages

```

Your content under this section renders on my end but there is some URL ambiguity.

For example your section contains a `fungicide.md` that resolves to `/plant_protection/fungicide/`

And a `/fungicide/` nested section that resolved to the same URL as above.

See the documentation on [Page Bundles](https://gohugo.io/content-management/page-bundles/#readout) and [Nested Sections](https://gohugo.io/content-management/sections/#nested-sections).

It’s up to you how you want organize your content and whether `/fungicide/` should be a Nested Section that uses an `_index.md` or a Page Bundle that should use an `index.md`

In any case you should remove the duplicate `.md` files that have the same name as the same sub-directories under your section.

---

<div class="post-metadata">

**Author:** ![marmara34](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/marmara34/32/5424_2.png) [@marmara34](https://discourse.gohugo.io/u/marmara34)\
**Post date:** [June 7, 2018, 10:07am UTC](https://discourse.gohugo.io/t/hugo-rendering-issue-theme-forty/12308/5 "2018-06-07T10:07:33Z")

</div>

Nested as;

```
└── _index.md
      └── fungicide.md (removed)
      └── fungicide
           └── _index.md (renamed as index.md)
           └── several markdown content pages

```

Now I see a blank page when I click on the link of ‘fungicide’

The content of the index.md is

> title: “fungicide”  
> layout: “list”  
> slug: “fungicide”  
> image: pic02.jpg  
> date: 2017-10-31T22:27:21-05:00  
> draft: false

🤔

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [June 7, 2018, 10:25am UTC](https://discourse.gohugo.io/t/hugo-rendering-issue-theme-forty/12308/6 "2018-06-07T10:25:21Z")

</div>

> [@marmara34](#):
>
> ```auto
> └── fungicide 
> └── _index.md (renamed as index.md)
> 
> ```
> 
> Now I see a blank page when I click on the link of ‘fungicide’

`index.md` = Leaf Bundle (single page) - default template `/layouts/_default/single.html`  
`_index.md` = Branch Bundle (list page) - default template `/layouts/_default/list.html`

But since you have specified `layout: “list”` in the front matter of your `index.md` make sure that the respective template `single.html` template exists under your `layouts/list/` folder or remove that front matter parameter and use the default single page template.

See [Template lookup order | Hugo](https://gohugo.io/templates/lookup-order/)

---

<div class="post-metadata">

**Author:** ![marmara34](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/marmara34/32/5424_2.png) [@marmara34](https://discourse.gohugo.io/u/marmara34)\
**Post date:** [June 7, 2018, 10:59am UTC](https://discourse.gohugo.io/t/hugo-rendering-issue-theme-forty/12308/7 "2018-06-07T10:59:50Z")

</div>

```
└── Plant Protection
      └── fungicide
           └── Item 1
           └── Item 2
      └── insecticide
           └── Item 1
           └── Item 2 
    └── Plant Nutrition
      └── fertilizers
           └── Item 1
           └── Item 2

```

This is the page hierarchy that i am trying to accomplish. Therefore, I guess my `/plant_protection` directory and `plant_protection/fungicide` directory must be a list page in order to list the items within those directories.  
So to say, I will need `_index.md` in those directories to make them list pages, am I right?

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [June 7, 2018, 11:03am UTC](https://discourse.gohugo.io/t/hugo-rendering-issue-theme-forty/12308/8 "2018-06-07T11:03:35Z")

</div>

> [@marmara34](#):
>
> I guess my /plant\_protection directory and plant\_protection/fungicide directory must be a list page in order to list the items within those directories.
> 
> So to say, I will need `_index.md` in those directories to make them list pages, am I right?

Yes. If you want the items within those directories to have their own permalinks you should turn them into Nested Sections.

---

<div class="post-metadata">

**Author:** ![marmara34](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/marmara34/32/5424_2.png) [@marmara34](https://discourse.gohugo.io/u/marmara34)\
**Post date:** [June 7, 2018, 11:25am UTC](https://discourse.gohugo.io/t/hugo-rendering-issue-theme-forty/12308/9 "2018-06-07T11:25:08Z")

</div>

Sorry for the headache

Second

When I put an `_index.md` into `plant_protection/fungicide` with the frontmatter below, I cannot see the link on the `plant_protection` directory (or page) to go to `plant_protection/fungucide` directory (or page)

```auto
---
title: "fungicide"
layout: ""
slug: "fungicide"
image: pic03.jpg
date: 2017-10-31T22:27:21-05:00
draft: false
---
fungusit

```

Note: I see the fungucide page alright when I reach to it by using typing the address into the address bar of the browser. So the question is that how can i put a link on `plant_protection` directory (or page) to reach to the fungicide page? That is the reason I used `fungicide.md` files on the upper directory ( `plant_protection` ). But it sometimes rendered correctly and sometimes not.

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [June 7, 2018, 12:10pm UTC](https://discourse.gohugo.io/t/hugo-rendering-issue-theme-forty/12308/10 "2018-06-07T12:10:06Z")

</div>

> [@marmara34](#):
>
> layout: “”

Eliminate completely the above.

> [@marmara34](#):
>
> But it sometimes rendered correctly and sometimes not.

Because there was ambiguity in your URLs so the rendering was a bit like winning the lottery.

---

<div class="post-metadata">

**Author:** ![marmara34](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/marmara34/32/5424_2.png) [@marmara34](https://discourse.gohugo.io/u/marmara34)\
**Post date:** [June 8, 2018, 12:57pm UTC](https://discourse.gohugo.io/t/hugo-rendering-issue-theme-forty/12308/11 "2018-06-08T12:57:23Z")

</div>

Gave up on this theme. Thanks for the time
