I’ve set the permalink for my posts to the following:
[permalinks]
posts = "/posts/:year/:month/:slug/"
Let’s say I have a post titled «Lorem ipsum», in a file named /content/posts/2019-05-31-lorem-ipsum.md. The slug is not set in the front matter, only the title. With the above permalink configuration, I expect the link to the post to be the following:
http://localhost:1313/posts/2019/05/lorem-ipsum/
However, I get:
http://localhost:1313/posts/2019/05/Lorem-ipsum/
With the default permalink configuration, the link is lowercased:
Hi @runar, welcome to the forums. So I think you may have a misunderstanding between Slug and Title. When specifying :slug in your permalink, that will look for a slug param in your page front matter, and if not found it will fall back to the title param.
I would recommend one of the following:
(1) Add a slug param to each page; or
(2) Instead of :slug, use :filename in your permalink, then rename your files appropriately.
I am (and was) aware of the difference between Slug and Title, but I thought that the :title param of the permalink would get automatically lowercased, as in other frameworks.
Thank you for the explanation, and possible solutions!
A quick update: It seems, for reasons unknown, that I had the following in my config.toml:
disablePathToLower = true
The purpose of this option is to «not convert the url/path to lowercase», and the default value is false. Removing this line removes the need to manually add slugs to all posts.
This illustrates how important it is to check your configuration before trying to solve an issue!