The blog template supports posts in nested sub-folders. This helps in organisation and can be used to group posts of similar content e.g. a multi-part series. This post is itself an example of a nested route! It's located in the /data/blog/nested-route
folder.
Simplify create multiple folders inside the main /data/blog
folder and add your .md
/.mdx
files to them. You can even create something like /data/blog/nested-route/deeply-nested-route/my-post.md
We use Next.js catch all routes to handle the routing and path creations.
Here's some reasons to use nested routes