Skip to content
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

[permalinks] ignored for capitalized folders / sections #8302

Closed
cvladan opened this issue Mar 5, 2021 · 5 comments
Closed

[permalinks] ignored for capitalized folders / sections #8302

cvladan opened this issue Mar 5, 2021 · 5 comments

Comments

@cvladan
Copy link

cvladan commented Mar 5, 2021

reproduced on: hugo v0.81.0+extended linux/amd64 BuildDate=unknown
... and that should be latest release

Permalinks ignored

It took me a while to figure it out, but [permalinks] line is ignored when section name is Title case capitalized.
For example, my folder structure is

/content/Projects

and my permalinks.yaml:

projects = ":sections/dummy/:title"

This should, but it doesn't work

Rename folder as only working solution?

When I rename folder to /content/projects to lowercase, it starts working again. If I leave folder to Projects and change accordingly in permalinks.yaml to Projects = ... or just leave it lowercase - in any case it doesn't work.

The only way to make it work is to rename a folder to lowercase, but this is the only solution that is not acceptable to me as I have a lot of folders with very descriptive title sentences.

I've experimented with disablePathToLower with no luck

@cvladan cvladan changed the title [permalinks] directive not working for Title case capitalized section names aka folders [permalinks] ignored for capitalized folders / sections Mar 5, 2021
@bep bep added the Bug label Mar 5, 2021
@bep bep added this to the v0.82 milestone Mar 5, 2021
@bep
Copy link
Member

bep commented Mar 5, 2021

So,

  • Hugo's "file system" is case insensitive
  • We should support upper case folders vs permalink config (not sure what happens there)
  • However, since we at some point throw away the case info, you might as well make it lowercase and put the title info into front matter

@cvladan
Copy link
Author

cvladan commented Mar 5, 2021

Yes, right now I've renamed the folder to lowercase and everything is working as expected again.

It was quite hard to detect this problem as it's not obvious to look for a bug in that direction. For me, it was more than two hours trying everything before stumbling on this solution. In the process, I tried all TOML/YAML/JSON, configuration like disablePathToLower and looking if there is some other configuration directive, etc.

@bep bep modified the milestones: v0.82, v0.83 Mar 21, 2021
@bep bep modified the milestones: v0.83, v0.84 May 1, 2021
@bep bep modified the milestones: v0.84, v0.85 Jun 18, 2021
@bep bep modified the milestones: v0.85, v0.86 Jul 5, 2021
@bep bep modified the milestones: v0.86, v0.87, v0.88 Jul 26, 2021
@bep bep modified the milestones: v0.88, v0.89 Sep 2, 2021
@bep bep modified the milestones: v0.89, v0.90 Nov 2, 2021
@bep bep modified the milestones: v0.90, v0.91.0 Dec 13, 2021
@bep bep modified the milestones: v0.91.0, v0.92.0 Dec 22, 2021
@bep bep modified the milestones: v0.92.0, v0.93.0 Jan 12, 2022
@bep bep modified the milestones: v0.93.0, v0.94.0 Mar 1, 2022
@bep bep modified the milestones: v0.102.0, v0.103.0 Aug 28, 2022
@bep bep modified the milestones: v0.103.0, v0.104.0 Sep 15, 2022
@bep bep modified the milestones: v0.104.0, v0.105.0 Sep 23, 2022
@bep bep modified the milestones: v0.105.0, v0.106.0 Oct 26, 2022
@bep bep modified the milestones: v0.106.0, v0.107.0 Nov 18, 2022
@bep bep modified the milestones: v0.107.0, v0.108.0 Dec 3, 2022
@bep bep modified the milestones: v0.108.0, v0.109.0 Dec 14, 2022
@bep bep modified the milestones: v0.109.0, v0.111.0, v0.110.0 Jan 26, 2023
@bep bep modified the milestones: v0.111.0, v0.112.0 Feb 15, 2023
@bep bep modified the milestones: v0.112.0, v0.113.0 Apr 15, 2023
@jmooring
Copy link
Member

Closing as duplicate of #10095.

@cvladan
Copy link
Author

cvladan commented Jun 8, 2023

To be honest, I've already decided that as soon as I find the time, I'm going to switch to Astro. I see that a lot of work is being done on Hugo, but the fact that it takes as many as 30 versions (112-81) and 2 years to fix such a fundamental bug is troubling.

Moreover, it was an incredibly easy bug to reproduce and it seems to me that it wasn't even taken seriously, rather they waited for someone else to report it again. Actually, it seems as if it was just left forgotten.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants