Blog as homepage, remove /blog/ from URLs yet error

Hi!

I’m new to Kirby, so sorry in advance for my probably silly question.

In order to make the blog the homepage of the website:

  1. I changed the name of the homepage folder to blog according to: home | Kirby CMS .
  2. I tried to remove the /blog/ part of my URLs by following the advice: Remove /blog/ from the URL
    Both seem to work fine.

However in homepage now when I click on a link to visit the article I get an Error. Is this normal? What do I forget?

Thanks in advance.

Could you post your complete config file with the routes, please?

Of course

<?php return [ 'debug' => true, 'home' => 'journal', 'yaml.handler' => 'symfony', ];

And the routes? Where are they defined?

There are no routes. Told you, I’m completely new to Kirby, sorry.

Could you please help me to define them?

Hm, but above you wrote that you did what is described in that post. And those routes are needed for the redirect to work. See also: Routes | Kirby CMS

Still baffled, sorry again.

I wrote the following rule in my models/note.php file:
public function url($options = null): string {
return $this->slug();
}

Does it help?

You need the two routes from the docs/the topic you mentioned above in your config. Without these routes it will not work.

Great! It worked. Thanks a lot.