Menu.Main is lowercased

Both Menu and Permalink are transformed to lower case. How can I select “leave case as is”?
Some of my urls are lowercase and some are camel case. (I know, not wise - but they have been this way for 20+ years!)
[[menu.main]]
identifier = “Sports”
name = “Sports”
weight = 4
url = “/Sports-Articles.htm”
The url always comes out as “sitename/sports-articles.htm”.
Is there any way to fix this in Hugo, without writing a post process gulp task?

20+ years ago people used gasoline with lead in it. Then they fixed that issue and made cars that can go lead-free :wink:

Why not writing a rule (depending on your server) that forwards all URLs with uppercase characters to their lowercase equivalent and going lowercase from now on?

I am not aware of a configuration or way to “fix” this as it’s a normal functionality. If you don’t add the url parameter it would take and “urlize” the title for the URL, all in lowercase. So this seems to be pretty deep in the system.

I never came across this, but you might look into the “slug” frontmatter. maybe that one stays as you define it? The slug frontmatter defines only the last part of the url, not the path to the folder.

You can still buy lead additive for gasoline - for engines that need it.
We can easily have our ftp uploader lower, upper, proper or camelcase all our urls. And have url rewriter take care of incoming urls. The problem is link checkers will get a 301 or 302. Many site owners just delete links to other sites if they get a redirect. Just assume link is bad or dead. With thousands of incoming links, many from high profile sites, can’t afford to take chance. Yes, if starting new site, would have all lower case, no underscores, etc. Thanks for suggestion re slug. If I can’t fix this, need to look elsewhere than Hugo, but like many features it has.

Hi,

Have a look at disablePathToLower: https://gohugo.io/getting-started/configuration/#all-configuration-settings

I haven’t tested it with menu urls myself, though.

1 Like

Thank you. disablePathToLower seems to work perfectly on both menu and permalink. However, writing out pages to ‘public’ folder are still lowercase, but they are right when using hugo server. In related section, pages that are not lowercase are ignored (not there). – Sorry, works … had to shut down editor and cmd prompt … cache?