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

Page collision not detected when one term has a space and the other a hyphen #12202

Open
jmooring opened this issue Mar 5, 2024 · 1 comment
Labels
Milestone

Comments

@jmooring
Copy link
Member

jmooring commented Mar 5, 2024

This isn't anything new. Behavior present since v0.55.0.

content/
├── p1.md  <-- tags: ["a b"]
└── p2.md  <-- tags: ["a-b"]
public/
├── p1/
│   └── index.html
├── p2/
│   └── index.html
├── tags/
│   ├── a-b/
│   │   └── index.html   <-- page collision
│   └── index.html
└── index.html

Expected hugo --printPathWarnings to detect collision.

By comparison, content tagged with "a,b" and "a;b" report a page collision (as expected), because they are both published to public/tags/ab/index.html.

@bep bep removed the NeedsTriage label Mar 13, 2024
@bep bep added this to the v0.125.0 milestone Mar 13, 2024
@bep bep added NotSure and removed NotSure labels Mar 13, 2024
@bep
Copy link
Member

bep commented Mar 13, 2024

Expected hugo --printPathWarnings to detect collision.

On the technical side, --printPathWarnings keeps track of filenames written to /public and print a warning if more than file is written to the same path.

The case in this issue happens earlier, and it's not obvious to me (at least in the general case) when it is a warning or not. The thing is, we already do lots of content merging where you will e.g. have files in project mounts etc. with the same name as in the theme, and we don't call these collisions.

That said, we should improve this, but it's not obvious to me what/how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants