I'm trying to create a blog with Solid Start and Markdown and am running into issues creating layouts specifically for the blog posts. Ideally, the following URLs have the following mapping:
- /blog --> the blog overview
- /blog/hello-world --> the post "hello-world.mdx"
The blog posts have their own layout, so somewhere I'll need a page file with an <Outlet> tag. Where should I place this?
Here are some file structures I've tried.
Does not register the layout.
/blog.tsx
/blog/(layout).tsx
/blog/hello-world.mdx
/blog/(index).tsx
/blog/(layout).tsx -- Error! two default pages
/blog/hello-world.mdx
Produces the correct layout, but wrong URL structure.
/blog/(index).tsx
/blog/posts/(layout).tsx
/blog/posts/hello-world.mdx
Does not use the correct layout
/blog/index.tsx
/blog/(post).tsx
/blog/hello-world.mdx
Does not use the correct layout
/blog/index.tsx
/blog/[id].tsx
/blog/hello-world.mdx