Replies: 5 comments 2 replies
-
|
Would love this enchancement in Astro! |
Beta Was this translation helpful? Give feedback.
-
|
By no means a priority but I really hope this gets added as a nice QoL improvement. It makes organising a "full-stack site" (Marketing, dashboard, etc) project that bit easier |
Beta Was this translation helpful? Give feedback.
-
|
This would be great, any chance to reconsider it in 2025? :) |
Beta Was this translation helpful? Give feedback.
-
|
FYi you can build this kind of custom abstraction in userland using https://inox-tools.fryuni.dev/custom-routing |
Beta Was this translation helpful? Give feedback.
-
|
Came here after AI hallucinated that the feature exists. It is a pretty useful feature especially for larger sites. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Body
Summary
Organize routes without affecting the URL structure using Route Group. This can be created by wrapping a folder’s name in parenthesis: (folderName)
Background & Motivation
To better organize the routes in the
pagefolder without the need to include subfolders that can affect the urls, something that could help is the use of Route Groups.This is a concept that was introduced in Next.js v13. It is well documented at this url:
https://beta.nextjs.org/docs/routing/defining-routes#route-groups
Astro is a great framework and in the use of several projects we have noticed that when the number of pages increases, it becomes a huge list of resources without semantic order. With this new feature we could separate into folders (without affecting the urls) pages that belong to different modules or goals.
Goals
Example
Beta Was this translation helpful? Give feedback.
All reactions