-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
Discourse thread: https://discourse.gohugo.io/t/section-index-md-page-isnt-being-created/10627
Sample project: https://github.com/ChrisTucker2000/hugorepro
Steps to reproduce:
- Create a section index page, e.g.
/content/cats/_index.md. - Create an appropriate template file, e.g.
/themes/mytheme/layouts/_default/list.html. - Set
uglyURLs = truein/config.toml. - Build the website with
hugo.
Expected result:
- The page should be created as
/public/cats/index.html.
Actual result:
- The page is created as
/public/cats.html.
Additional information:
There is a Hugo documentation page discussing how uglyURLs works: https://gohugo.io/content-management/urls/#ugly-urls
It clearly says on this page that /content/about/_index.md will map to https://example.com/about/ with uglyURLs = false and https://example.com/about/index.html with uglyURLs = true (so basically the same output file).
This is the behavior that I expect, but it is not the behavior I'm getting.
Therefore this is either a bug in Hugo itself, or a mistake in the documentation. I hope it's the former, because this behavior seems totally bizarre and insane to me.