slug is nested-route/introducing-multi-part-posts-with-nested-routing copy
API返回:{"id":210,"username":"o9cyA5-7J85nUr0GGLgcE8M_KPEM","email":"o9cya5-7j85nur0gglgce8m_kpem@1zimu.com","provider":"local","confirmed":true,"blocked":false,"createdAt":"2023-12-10T07:32:13.197Z","updatedAt":"2023-12-10T07:32:24.062Z","payment_at":"2023-12-10T07:32:24.059Z","mobile_number":null,"paid":1,"nickname":"全都死掉*****@**.com","registerfrom":3,"zm1_expire_at":null,"zm1_paid":null,"zm1_member_type":null}
Published on

Introducing Multi-part Posts with Nested Routing Copy

Authors

Nested Routes

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.

How

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.

Use Cases

Here are some reasons to use nested routes

  • More logical content organisation (blogs will still be displayed based on the created date)
  • Multi-part posts
  • Different sub-routes for each author
  • Internationalization (though it would be recommended to use Next.js built-in i8n routing)

Note

  • The previous/next post links at bottom of the template are currently sorted by date. One could explore modifying the template to refer the reader to the previous/next post in the series, rather than by date.