# Hugo ignores leaf bundle files that were not changed after the last build

**URL:** <https://discourse.gohugo.io/t/hugo-ignores-leaf-bundle-files-that-were-not-changed-after-the-last-build/49432>\
**Category:** support\
**Created:** [April 22, 2024, 10:56pm UTC](https://discourse.gohugo.io/t/hugo-ignores-leaf-bundle-files-that-were-not-changed-after-the-last-build/49432 "2024-04-22T22:56:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ches](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ches/32/21902_2.png) [@ches](https://discourse.gohugo.io/u/ches)\
**Post date:** [April 22, 2024, 10:56pm UTC](https://discourse.gohugo.io/t/hugo-ignores-leaf-bundle-files-that-were-not-changed-after-the-last-build/49432/1 "2024-04-22T22:56:50Z")

</div>

1. Create a new site according to the [Quick Start Guide](https://gohugo.io/getting-started/quick-start/).
2. Create a new file: `content/index.md`. This is an index page for your website.
3. Create a leaf bundle page: `content/faq/index.md`. Put some text in it.
4. Run `hugo server`. Navigate to `http://localhost:1313/faq/`. You’ll see the FAQ page content.
5. Stop `hugo server`. Delete `public` folder in the root dir of your hugo project.
6. Run `hugo server`. Navigate to `http://localhost:1313/faq/`. **I am getting a 404 error. What I expect to get is still the FAQ page.** `http://localhost:1313/`, the index page of the website is rendered ok, does not give me a 404.
7. Change `content/faq/index.md` contents, put a different text there. The browser page is reloaded, I see the new contents of the FAQ page as expected.
8. If I delete the `public` folder and start the server again, my FAQ page gives me a 404 again until I change its contents.

Same happens if I just execute `hugo` to build the website without serving. The FAQ page is missing in `public` folder completely. It is not included in `sitemap.xml` either.

Why is my page not picked up after the `public` folder is deleted? What I witness does not seem like the expected behavior to me especially in case of running plain `hugo` command.

My **hugo.yml** (not yaml or toml extension, but this should not matter I guess) is the following:

```auto
baseUR: https://example.org/
languageCode: en-us
title: My New Hugo Site
theme: ananke

```

My hugo version is `hugo v0.125.1-68c5ad638c2072969e47262926b912e80fd71a77+extended windows/amd64 BuildDate=2024-04-18T08:21:19Z VendorInfo=gohugoio`. Running from powershell.

---

<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 22, 2024, 10:58pm UTC](https://discourse.gohugo.io/t/hugo-ignores-leaf-bundle-files-that-were-not-changed-after-the-last-build/49432/2 "2024-04-22T22:58:25Z")

</div>

> [@ches](#):
>
> Create a new file: `content/index.md`. This is an index page for your website.

```plaintext
mv content/index.md content/_index.md

```

---

<div class="post-metadata">

**Author:** ![ches](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ches/32/21902_2.png) [@ches](https://discourse.gohugo.io/u/ches)\
**Post date:** [April 22, 2024, 11:08pm UTC](https://discourse.gohugo.io/t/hugo-ignores-leaf-bundle-files-that-were-not-changed-after-the-last-build/49432/3 "2024-04-22T23:08:04Z")

</div>

Thank you, @jmooring! It helped and it makes sense! The docs section on [Page Bundles](https://gohugo.io/content-management/page-bundles/#leaf-bundles) mentions:

```plaintext
content/
├── about
│ └── index.md
├── posts
│ ├── my-post
│ │ ├── content-1.md
│ │ ├── content-2.md
│ │ ├── image-1.jpg
│ │ ├── image-2.png
│ │ └── index.md
│ └── my-other-post
│ └── index.md
└── another-section
    ├── foo.md
    └── not-a-leaf-bundle
        ├── bar.md
        └── another-leaf-bundle
            └── index.md

```

> `content-1`, `content-2` These are resources of resource type `page`, accessible via the [`Resources`](https://gohugo.io/methods/page/resources/) method on the `Page` object. Hugo will not render these as individual pages.

---

<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:** [April 24, 2024, 11:08pm UTC](https://discourse.gohugo.io/t/hugo-ignores-leaf-bundle-files-that-were-not-changed-after-the-last-build/49432/4 "2024-04-24T23:08:57Z")

</div>

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