hugo icon indicating copy to clipboard operation
hugo copied to clipboard

Permalinks with uppercase are ignored / not applied

Open BenSouchet opened this issue 1 year ago • 1 comments

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.

BenSouchet avatar Jul 16 '22 18:07 BenSouchet

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.

BenSouchet avatar Jul 16 '22 20:07 BenSouchet

Out of curiosity, does it work if you create a content file for the taxonomy at content/projectTags/_index.md?

regisphilibert avatar Aug 27 '22 16:08 regisphilibert

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

jmooring avatar Nov 04 '22 22:11 jmooring

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.

github-actions[bot] avatar Nov 05 '23 01:11 github-actions[bot]

This was fixed in v0.123.0.

jmooring avatar Feb 18 '24 15:02 jmooring

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[bot] avatar Mar 11 '24 01:03 github-actions[bot]