# Site builds become unreproducible when using layouts/page folder

**URL:** <https://discourse.gohugo.io/t/site-builds-become-unreproducible-when-using-layouts-page-folder/55661>\
**Category:** support\
**Created:** [August 14, 2025, 8:29pm UTC](https://discourse.gohugo.io/t/site-builds-become-unreproducible-when-using-layouts-page-folder/55661 "2025-08-14T20:29:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElnuDev](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/elnudev/32/16222_2.png) [@ElnuDev](https://discourse.gohugo.io/u/ElnuDev)\
**Post date:** [August 14, 2025, 8:29pm UTC](https://discourse.gohugo.io/t/site-builds-become-unreproducible-when-using-layouts-page-folder/55661/1 "2025-08-14T20:29:40Z")

</div>

Not excactly _support_ per-se as I’ve solved this issue now but I’m still very confused about what was exactly happening. I have two pages on my site that I have custom layouts on, for instance on the gallery page:

```markdown
---
layout: gallery
---

```

And I was keeping the corresponding layout file in layouts/page/gallery.html (it has been a long time since I made these templates so I don’t remember where I read about this method). This worked on my local system but I found that when building on my server with I believe the same version of Hugo it was basically a coin toss whether or not Hugo would decide to use the gallery template on this page. It would never give any errors either. So on occasion after updating my site content the entire page would just disappear and use the default layout template. I fixed it once by updating Hugo but then later it happened again.

I have now switched to using the more proper layouts/gallery/single.html and everything seems to work fine now, but I’m a bit disturbed that Hugo builds might not actually be entirely reproducible.

Any ideas what was happening? It seemed to be happening on v0.148.1.

---

<div class="post-metadata">

**Author:** ![tyco](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tyco/32/23754_2.png) [@tyco](https://discourse.gohugo.io/u/tyco)\
**Post date:** [August 14, 2025, 9:07pm UTC](https://discourse.gohugo.io/t/site-builds-become-unreproducible-when-using-layouts-page-folder/55661/2 "2025-08-14T21:07:39Z")

</div>

> [@ElnuDev](#):
>
> layouts/page/gallery.html

This was deprecated. See [Possible bug: Single layout for pages in v0.147.9 - #2 by jmooring](https://discourse.gohugo.io/t/possible-bug-single-layout-for-pages-in-v0-147-9/55179/2).

The solution is to move all layouts inside the page folder to the root of layout or remove the layout from front matter and mirror your content’s page path [New template system in Hugo v0.146.0](https://gohugo.io/templates/new-templatesystem-overview/#changes-to-template-lookup-order).

---

<div class="post-metadata">

**Author:** ![ElnuDev](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/elnudev/32/16222_2.png) [@ElnuDev](https://discourse.gohugo.io/u/ElnuDev)\
**Post date:** [August 14, 2025, 10:00pm UTC](https://discourse.gohugo.io/t/site-builds-become-unreproducible-when-using-layouts-page-folder/55661/3 "2025-08-14T22:00:47Z")

</div>

I see, thank you!

> [@Possible bug: Single layout for pages in v0.147.9](https://discourse.gohugo.io/t/possible-bug-single-layout-for-pages-in-v0-147-9/55179/2):
>
> The `layouts/page` construct, where “page” refers to the “page” page kind, is not supported with v0.146.0 or later.

Shouldn’t Hugo give a warning if it’s deprecated then? This issue is not immediately obvious when migrating to newer versions, so I presume that I originally wrote my templates prior to v0.146.0.

---

<div class="post-metadata">

**Author:** ![tyco](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tyco/32/23754_2.png) [@tyco](https://discourse.gohugo.io/u/tyco)\
**Post date:** [August 14, 2025, 10:15pm UTC](https://discourse.gohugo.io/t/site-builds-become-unreproducible-when-using-layouts-page-folder/55661/4 "2025-08-14T22:15:12Z")

</div>

> [@ElnuDev](#):
>
> Shouldn’t Hugo give a warning if it’s deprecated then?

That you will need to ask @jmooring or @bep .

> [@ElnuDev](#):
>
> This issue is not immediately obvious when migrating to newer versions

Perhaps it should be added here [New template system in Hugo v0.146.0](https://gohugo.io/templates/new-templatesystem-overview/#changes-to-template-lookup-order).

---

<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:** [August 16, 2025, 10:15pm UTC](https://discourse.gohugo.io/t/site-builds-become-unreproducible-when-using-layouts-page-folder/55661/5 "2025-08-16T22:15:21Z")

</div>

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