hugo
hugo copied to clipboard
Permalinks with uppercase are ignored / not applied
What version of Hugo are you using (hugo version
)?
$ hugo version hugo v0.101.0+extended darwin/amd64 BuildDate=unknown
Does this issue reproduce with the latest release?
Yes
The issue
I created a new Taxonomy (in my config file .yaml
):
taxonomies:
category: categories
tag: tags
projectTag: projectTags
and I wanted to customize the permalink (still in the config file):
permalinks:
projectTags: /projects/tag/:slug/
But
The permalink doesn't work, the terms urls are still using default generated permalink (e.g. /projecttags/test/
)
If I remove the uppercase letter projectTags
-> projecttags
, then all is working properly.
Yes, I think I will avoid uppercase letters but I found nothing in the documentation about lowercase for Permalinks or even for lowercase in naming / naming convention for config variables.
The only element that is indicated is when we use function like isset
we need to provide a full lowercase string with the variable name (here)
This is still a bug or at least a limitation, and except the custom permalink the usage of a taxonomy with uppercase work well.
Out of curiosity, does it work if you create a content file for the taxonomy at content/projectTags/_index.md
?
Minimal reproducible example:
git clone --single-branch -b hugo-github-issue-10095 https://github.com/jmooring/hugo-testing hugo-github-issue-10095
cd hugo-github-issue-10095
hugo && tree public
config
[permalinks]
projectTags = '/projects/tag/:slug/'
[taxonomies]
projectTag = 'projectTags'
Expected output:
public/
├── post/
│ ├── test/
│ │ └── index.html
│ └── index.html
├── projects/
│ └── tag/
│ └── foo/
│ └── index.html
├── projecttags/
│ └── index.html --> this is expected because the permalink setting does not apply to section pages
└── index.html
Actual output:
public/
├── post/
│ ├── test/
│ │ └── index.html
│ └── index.html
├── projecttags/
│ ├── foo/
│ │ └── index.html
│ └── index.html
└── index.html
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master
branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
This was fixed in v0.123.0.
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.