Strange behavior

I am seeing strange behavior and suspect a bug. I’ll list information as a think it relevant and feel free to ask follow ups.

My site is setup with index.md pages inside a folder, like this:

.
└── content
    └── alan
    |   └── index.md
    └── sarah
    |   └── index.md

I run this command:

hugo server --watch=true --buildDrafts --verbose --disableFastRender

Then hit this url: http://localhost:1313/alan/
Result: Page not found.

In my code editor (VS Code), I save the file ./content/alan/index.md
In the browser, the page loads correctly.

I kill the hugo service and run the exact same command again.
Result: Page Not Found
Save the same file again, the page loads correctly.

Something seems off, but I can’t tell what.

Also, when I run hugo and check the public directory, the alan folder doesn’t exist.
Results with the sarah folder are the same in that the same actions result in the same behavior.

I suspect you have an index.md file where you should have an _index.md file, perhaps in the root of your content directory.

But hard to say without seeing your project.

I renamed the index.md to _index.md in the root directory and it seems to resolve the issue. I have no idea why though, so I guess I’ll be researching that.

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