Routes.yaml custom route gives 404 error

Hello everyone,

I’ve been looking at a lot of posts here, but I wasn’t able to find an answer. I created a custom route inside the routes.yaml file, but when I visit site.com/custom_link ; All I get is 404 Site doesn’t exist. In this case it is “/terminal/” and terminal.hbs file is also in the theme folder.

What am I doing wrong?

image

What you’re doing looks right. Consider the possibility that your hbs file is throwing an error. If you can run locally and see the logs, that’s going to be informative.

1 Like

Make sure you create the page in Ghost as well.

I’ve had issues with one of my sites after updating the routes.yaml, the fix was simply restarting the server. Not sure why, maybe a cache issue.

1 Like

I saw that data needs to be declared in the routes.yaml. Are variables used in the “normal” hbs files only accessable via this data input? Or are they global?

What exactly do you mean with “create in Ghost as well”?. I thought I create a blueprint html, which then gets rendered. Do I need to create an empty page?

Everything looks like it was set up correctly. Have you tried restarting Ghost? If your terminal template was added after Ghost was already started, then you’ll need to restart Ghost for it to be recognized.