Unable to make /thing/ and /thing/otherthing work at the same time

Hi everyone,

Started using Hugo a while back. I really haven’t followed along with the development so maybe some things have changed. But, I checked the documentation and I think what I’m doing should work, but it doesn’t. Behavior seemed odd so I gave the latest (0.37?) a try.

Basically, I have /content with pages in it, some right under /content/, most under /content/posts/. That’s always been fine.

Well, recently added /business.md which resolves to /business/. All fine. Now, I want to have /business/1988-honda-hawk-gt-for-sale/. So, I tried content/business.md and content/business/1988-honda-hawk-gt-for-sale.md. No dice, /business/ shows up rendered but with no content. So then I move /business.md to /business/_index.md. Also renders with no content. /business/1988-honda-hawk-gt shows up just fine. Then I try /business/index.md. Now /business/ is fine but /business/1988-honda-hawk-gt/ 404’s with hugo server.

Not really sure what’s going on. Seems like I should be able to have /business/_index.md and /business/anything.md, right?

Maybe something is off with my theme but I’d like to make this work in content. Seems like a very simple thing.

Here’s my theme: https://github.com/teran-mckinney/hugo-theme-html5

And content/configuration (minus this new stuff I’m trying out): https://github.com/teran-mckinney/go-beyond.org

I appreciate any help that you can give me.

Thank you for your time.

-Teran

Well, tried a bunch of things and came up with a fix. Seems like index.md gets rendered with single and _index.md gets rendered as list.

So I made display content. This was my fix: https://github.com/teran-mckinney/hugo-theme-html5/commit/b50d64535b42d86bc6c645556237db5145504ff4

I’m sure there are better ways to do this. My usage of Hugo is definitely just scratching the surface of what Hugo can do.

That’s correct. This recent post I made today might help you understand that concept better: