# Issues in output folder structure while updating Hugo to v0.56

**URL:** <https://discourse.gohugo.io/t/issues-in-output-folder-structure-while-updating-hugo-to-v0-56/31667>\
**Category:** support\
**Created:** [March 10, 2021, 8:47am UTC](https://discourse.gohugo.io/t/issues-in-output-folder-structure-while-updating-hugo-to-v0-56/31667 "2021-03-10T08:47:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bsvinothraj](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bsvinothraj/32/13819_2.png) [@bsvinothraj](https://discourse.gohugo.io/u/bsvinothraj)\
**Post date:** [March 10, 2021, 8:47am UTC](https://discourse.gohugo.io/t/issues-in-output-folder-structure-while-updating-hugo-to-v0-56/31667/1 "2021-03-10T08:47:01Z")

</div>

We are facing some issues while updating Hugo to v0.56. We think it has something to do with this [issue](https://github.com/gohugoio/hugo/issues/4870).

**Note** : We have enabled _uglyurls_ for our site and have not set any slugs.

**Sample content folder structure:**

- content/dir1/page1.md

- content/dir1/page2/index.md

**Before v0.56, the output would be,**

```
baseUrl/dir1/page1.html

baseUrl/dir1/page2/index.html

```

**In v0.56, the output is,**

```
baseUrl/dir1/page1.html

baseUrl/dir1/page2.html

```

Is the new one, the intended behavior? Anyways to retain the previous behavior?

---

<div class="post-metadata">

**Author:** ![divinerites](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/divinerites/32/12625_2.png) [@divinerites](https://discourse.gohugo.io/u/divinerites)\
**Post date:** [March 10, 2021, 11:36am UTC](https://discourse.gohugo.io/t/issues-in-output-folder-structure-while-updating-hugo-to-v0-56/31667/2 "2021-03-10T11:36:23Z")

</div>

Does this happens with the latest hugo v0.81.0 ? 0.56 is _very_ outdated.  
And we need to see your configuration and set up to be able to help more.

---

<div class="post-metadata">

**Author:** ![bsvinothraj](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bsvinothraj/32/13819_2.png) [@bsvinothraj](https://discourse.gohugo.io/u/bsvinothraj)\
**Post date:** [March 10, 2021, 2:00pm UTC](https://discourse.gohugo.io/t/issues-in-output-folder-structure-while-updating-hugo-to-v0-56/31667/3 "2021-03-10T14:00:23Z")

</div>

Thanks, @divinerites

We have checked this in the latest version of Hugo (0.81.0) as well.

Please find our sample Hugo site [here](https://github.com/bsvinothraj/samplehugoapp) in Github to see the configuration and output of the version (0.53) and version (0.81.0) to compare.

---

<div class="post-metadata">

**Author:** ![divinerites](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/divinerites/32/12625_2.png) [@divinerites](https://discourse.gohugo.io/u/divinerites)\
**Post date:** [March 10, 2021, 2:03pm UTC](https://discourse.gohugo.io/t/issues-in-output-folder-structure-while-updating-hugo-to-v0-56/31667/4 "2021-03-10T14:03:58Z")

</div>

i didn’t tested it, but can you rename `dir1/page2/index.md` (bundle) to `dir1/page2/_index.md` so it is a regular page/section ?

see [Page Bundles | Hugo](https://gohugo.io/content-management/page-bundles/)

---

<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:** [March 10, 2021, 9:41pm UTC](https://discourse.gohugo.io/t/issues-in-output-folder-structure-while-updating-hugo-to-v0-56/31667/5 "2021-03-10T21:41:36Z")

</div>

> [@bsvinothraj](#):
>
> Is the new one, the intended behavior?

Yes.

> [@bsvinothraj](#):
>
> Anyways to retain the previous behavior?

Yes, but it is ugly, prone to user error, not future-proof, and will likely be a maintenance headache. Having said that:

1. Rename `content/dir1/page2/index.md` to `content/dir1/page2/__index.md`. Note that the new file name begins with two underscores. The file name is actually irrelevant, as long as it is neither `index.md` nor `_index.md`.
2. Add `slug: index` to the file’s front matter.

> Credit to [github.com/TjeuKayim](https://github.com/gohugoio/hugo/issues/4428#issuecomment-433694340).

If it were me, and I were transitioning a site from \< v0.56 to v0.81, I would live with the new URLs, and create 301 redirects where needed. In the long run this one-time effort will be well worth the expense.

---

<div class="post-metadata">

**Author:** ![bsvinothraj](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bsvinothraj/32/13819_2.png) [@bsvinothraj](https://discourse.gohugo.io/u/bsvinothraj)\
**Post date:** [March 29, 2021, 6:09am UTC](https://discourse.gohugo.io/t/issues-in-output-folder-structure-while-updating-hugo-to-v0-56/31667/6 "2021-03-29T06:09:32Z")

</div>

Thanks, @jmooring

I could see your solution will work. However, we are having a lot of similar pages and it will be hard to rename and add slug for everything.

Instead, we’re planning to add a URL param in the front matter which reduces almost half of the burden and it is familiar to us.

---

<div class="post-metadata">

**Author:** ![bsvinothraj](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bsvinothraj/32/13819_2.png) [@bsvinothraj](https://discourse.gohugo.io/u/bsvinothraj)\
**Post date:** [March 29, 2021, 6:13am UTC](https://discourse.gohugo.io/t/issues-in-output-folder-structure-while-updating-hugo-to-v0-56/31667/7 "2021-03-29T06:13:25Z")

</div>

It worked @divinerites. As we have more pages like this, it will be hard to change and maintain everything.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [March 31, 2021, 6:14am UTC](https://discourse.gohugo.io/t/issues-in-output-folder-structure-while-updating-hugo-to-v0-56/31667/8 "2021-03-31T06:14:21Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
