I want the urls to not contain the date, so the resulting post should have the following url:
I do not really care about the date in the filename.
It is there for me looking at the content/posts directory and seeing my posts in chronological order.
I can set the posts date in the frontmatter, no problem.
I tried to find a way to achieve this, but couldn’t find anything that worked.
I searched for stuff like “strip date from url” or “permalinks jekyll style”, but I wasn’t successful.
Can you please help me remove dates from the urls?
That is what I had been trying before, but It broke my site. I thought something was wrong with these two lines, but it turns out that I am just not smart enough to use toml right and I made it so my theme wasn’t found anymore.
Thank you a lot, I got it working now.
I have two questions left, though:
I see how the above config get’s the date from the path, but I couldn’t find a single sentence in the documentation that tells me that hugo will then remove that date from the url. Am I missing something?
Why do you recommend hyphens over underscores? For me as a python programmer the hyphens look more natural.
Consider using hyphens to separate words in your URLs, as it helps users and search engines identify concepts in the URL more easily. We recommend that you use hyphens (- ) instead of underscores (_ ) in your URLs.