Hugo: Front matter URL: two dashes get parsed into one -

Created on 31 May 2019  Â·  4Comments  Â·  Source: gohugoio/hugo

Hi,

I discovered the following problem:
In my front matter I define a URL, let’s say:

url: my–test

What I would expect from to be the output of this would be a file called “my–test.html”.
Surprisingly the output is: "my-test.html.
Two dashes get turned into one, which is not what I would expect and need.
How I can prevent this from happening?

I run Hugo at version:
Hugo Static Site Generator v0.54.0/extended windows/amd64 (this happens also with Hugo 0.55.x as disscused here https://discourse.gohugo.io/t/front-matter-url-two-dashes-get-parsed-into-one/18979)
and configured it to use

canonifyURLs: true

Thanks for your help and best wishes,
Max

Most helpful comment

Actually I pointed the user to open this issue since this behavior seems like a reproducible bug.

There was no double posting.

All 4 comments

How I can prevent this from happening?

I don't think you can do anything about it.

OK, so it's a bug then, not a feature (like I expected)?

Let's take this at https://discourse.gohugo.io/t/front-matter-url-two-dashes-get-parsed-into-one/18979 -- I'm not a big fan of double posting.

Actually I pointed the user to open this issue since this behavior seems like a reproducible bug.

There was no double posting.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ianbrandt picture ianbrandt  Â·  3Comments

sigma picture sigma  Â·  3Comments

MunifTanjim picture MunifTanjim  Â·  3Comments

antifuchs picture antifuchs  Â·  3Comments

artelse picture artelse  Â·  3Comments