gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
73.52k stars 7.38k forks source link

Adding/removing hyphen from tag in front matter isn't detected by hugo server #12565

Open willfaught opened 3 weeks ago

willfaught commented 3 weeks ago

Start with:

tags: ["sliding-window"]

It's displayed on the page as Sliding-Window.

Change it to:

tags: ["sliding window"]

It's still displayed on the page as Sliding-Window.

Restart hugo server. Refresh the page.

Now it's displayed on the page as Sliding Window.

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.126.3+extended darwin/arm64 BuildDate=2024-06-02T13:02:43Z VendorInfo=brew

Does this issue reproduce with the latest release?

Yes

jmooring commented 3 weeks ago

Related to https://github.com/gohugoio/hugo/issues/12202.

The terms "foo bar" and "foo-bar" are published to the same path: public/tags/foo-bar/index.html. Testing as far back as v0.54.0 you get the same behavior... this isn't anything new.