URL generation for blogposts (exclude folders)?

Hey guys!

I am working on a new blog using Kirby CMS for the first time. I’m using the Baseblog theme as a basis, in case this is relevant for my problem.
Which is: I’m saving all my blogposts in a /1-blog/ folder and I set the home as c::set('home', 'blog'); in the config.php. When I navigate to the root, everything works as expected. But if I open individual blogposts, the blog folder will be included in the URL e.g. mydomain.com/blog/blogpost instead of mydomain.com/blogpost.
Is there any way to keep the blogposts in the /blog/ folder, but exclude the folder from the URL?

Thanks in advance for your help!

Hi @cantoo,

you can use a route. Check out the docs: https://getkirby.com/docs/developer-guide/advanced/routing#omitting-the-blog-folder-in-urls

If you need more help, don’t hesitate to ask.

1 Like

Awesome! Thanks for your help! I guess I haven’t gotten deep enough into the advanced docs yet :grin: