Pages with _index.md not updating

#1

I’ve been having this problem since the last few versions. I updated to v0.55 but it’s still happening.
I feel like I understand the leaf vs branch usage of index.md vs _index.md, but I am at a loss to why my _index.md pages inside branches aren’t updating. When I temporarily rename them to index.md, I can update them that way, but I have to rename it back to _index.md to get the other pages to update.

I have taxonomy terms disabled in my config:
disableKinds = ["taxonomy", "taxonomyTerm"]

This is my file structure:

.
├── _index.md (homepage)
├── before-and-after-photos
│   ├── _index.md
│   └── gallery
│       ├── _index.md
│       ├── 1
│       │   ├── _index.md
│       │   ├── item-one.md
│       │   ├── ...
│       │   └── item-xxx.md
│       ├── ...
│       └── xxx
│           ├── _index.md
│           ├── item-one.md
│           └── item-xxx.md
├── blog
│   └── _index.md
├── section-one
│   ├── _index.md
│   ├── topic-one.md
│   ├── ...
│   └── topic-xxx.md
├── section-two
│   ├── _index.md
│   ├── topic-one.md
│   ├── ...
│   └── topic-xxx.md
└── section-three
    ├── _index.md
    ├── topic-one.md
    ├── ...
    └── topic-xxx.md

Currently, blog is empty (no posts), but the _index there will be the list page.
The homepage and before-and-after-photos subbranches seem to update correctly.
The section-one, section-two, and section-three _index pages don’t update unless I temporarily rename them to index.

Not sure why this is happening, or do I need to change my structure to make it work better?

#2

Hi,

I’m not sure I understand, what do you mean by “not updating”? Do you have your code somewhere we can have a look at to see if we can reproduce this issue?

#3

When I run hugo, /index.html is overwritten with a new version, but /section-one/index.html is not overwritten with a new version. /section-one/topic-one.html is also overwritten with a new version.

I am not sure what part my code you’d like to see?

#4

Ideally your whole project, if you are able to share it. Otherwise, a smaller version, with dummy content that reproduces the issue, so I or others can test to see if the issue persists.

Your content structure does not stand out to me as being ‘unusual’, so I can’t really say just looking at it what is wrong. So it could be something in the layouts, or the config, or something else entirely.

Please also have a read on Requesting Help for more details.

#5

Okay, I will get back to you with a dummy repository, hopefully after this weekend. Thank you.

#6

My apologies for the delay, I got slammed with tasks and then got sick. The site I originally posted about still has that problem, but it also has some sensitive info, so I was going to make a dummy repo. However, now I’m working on a different project, and ran into the same problem, so it seems like I am doing something wrong. This one I can share; it was originally on hugo v0.31.1, and I have copied it to a new server with hugo v0.55.5.

The _index.md files for these folders don’t update index.html: /contact/ /cosmetic-dentistry/ /landing/
These folders do: /blog/ /career-opportunities/ /locations/ /locations/dental-team/ /smile-gallery/

I’ve created a bitbucket repository here: https://lucidmist@bitbucket.org/lucidmist/cunningdental.git
What email do I put into the share settings?

Thank you.

#7

Sorry to hear you are running into so much trouble, @lucidmist-austin. A better way is to build a small, public-sharable project that reproduces the error you are running into. We volunteer to fix problems for everyone using Hugo, so we need to be able to show what changes we made to fix yours.

Hope you are feeling better, and have time to put together a sharable repo. :slight_smile: