Issues after adding a new route

Hi everyone,

I’m currently moving my posts from my homepage to a new blog location for a more static homepage. I’ve added to the routes file so the / collection goes to /blog/{slug}/ meaning{{slug}} now directs to{{slug}}. This works great internally.

My problem comes with all my external links to my website as they go to the first{{slug}} url and cannot be found. Is there a way to fix this in the redirects file? My only idea is individual hardcoding each post as {{slug}} doesn’t seem to work from what I can tell.


I ended up doing it for each. If you have the same issue I exported the data. Looked through it to see the path for the slug navigated:

  "db": [
      "data": {
    "offers": [],
        "posts": [
"slug": “foo”,

Asked chatgbt for the jq and ended up with; cat filename | jq '.db[].data.posts[].slug' which over time became with redirect. Hope it helps someone.

I wrote a post on how I did this. And the came up with another example of how I’d do it if I had to do it again. You can find both examples at my website SimplyKyra.