Deeply Nested Routes

Use deeply nested folders to create complex URL hierarchies.

Deeply Nested Routes

You can nest folders inside folders to create arbitrarily deep URL structures. This is useful for documentation trees, multi-step flows, or organizing blog categories.

routes/docs/getting-started/index.html    →   /docs/getting-started
routes/docs/api/auth/index.html           →   /docs/api/auth
routes/blog/_slug/comments/index.html     →   /blog/my-post/comments

Each nested route behaves just like a top-level one - complete with templating, dynamic logic, and caching. Combine this with layouts to avoid duplication across sections.