#MDX routes not found

1 messages · Page 1 of 1 (latest)

flint gust
#

Hello everyone, I'm new to remix and I'm trying to use the mdx routes, but they don't work, it gives me a 404 error. I'm using the remix + netlify template. Does anyone have any idea how to fix it?

#

my route structure is routes/posts/my-first-post.mdx but when I access http://localhost:3000/posts/my-first-post I receive a GET http://localhost:3000/posts/my- blog 404 (Not Found)

small mesa
#

Not sure if that's the issue as I haven't tried MDX routes, but maybe it's because you're using deep routes

#

Remix only cares about top-level folders

#

And the folder must have a route.tsx file there, all the other things there are helpers not considered by Remix as routes

#

To test this hypothesis try renaming your post to app/routes/posts.my-first-post-mdx , if that works, then I'm on the rigth path 😉

flint gust
#

That's the problem, thank you. Now do you know if there is a way to have all my posts in a folder without interfering with the path?