-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug with mixed case section/type to mixed case layout folders #12398
Comments
It would be helpful if you could share your project with us. I am unable to recreate the problem based on the description above. |
And now, just to be sure, I changed the folder name from "artProject" to only "art" and it magically works. And I can reproduce it! If the folder name is only lowercase it works, if it contains an upper case it is ignored. Is there any naming scheme I couldn't find in the docs? EDIT: Updated the original issue to reflect this issue. |
With this content structure:
Which means you can't do this anymore:
I'm guessing that both I'm not sure if this is one of the intentional breaking changes in v0.123.0. Regardless, change your layouts structure to:
|
Sounds plausible that it is caused by the function because copying the folder from layouts to the templates layouts folder doesn't help. So it seems to be a global problem. If it is intended and only lowercase is allowed now we should add some documentation for it. Oh and it doesn't help to just rename the layout folder to a lowercase version, we need to rename the content structure too. |
Yes, it does, try it.
Then visit |
Ah your right, this was a wrong observation either due to caching or changing path names. (It was late yesterday) |
What version of Hugo are you using (
hugo version
)?hugo v0.125.1+extended linux/amd64 BuildDate=unknown
from arch linux
Problem
This issue started occurring with hugo v0.123.0. So it worked before. Nothing else changed in the working tree.
For a part of my site, I use a different layout configured under /layouts, but this is ignored starting with 0.123.
I've searched for two hours now, but I can't find any problem with my setup. Everything is like described in the docs (https://gohugo.io/templates/views/). And after doing a downgrade to v0.122.0 it is immediately working again.
The folder tree looks similar to this:
/content/artProject/_index.md
/content/artProject/oneArtProject.md
/content/artProject/anotherArtProject.md
Then there is:
/layouts/artProject/list.html
And according to the docs, this should be used, but instead it is always falling back to:
/themes/themeName/layouts/_default/lists.html
It sounds a little bit similar to #12146 and #12193, but not the same, and I normally would assume that such a big problem would have been observed by others after the time since the 0.123.0 release.
Oh and if I call hugo with --printUnusedTemplates it also tells me that it is not using the stuff under /layouts
The text was updated successfully, but these errors were encountered: