Skip to content

feat(router): support optional catch all routes#2043

Merged
brandonroberts merged 7 commits intoanalogjs:betafrom
mhartington:feat/next-style-optional-catch-all
Feb 24, 2026
Merged

feat(router): support optional catch all routes#2043
brandonroberts merged 7 commits intoanalogjs:betafrom
mhartington:feat/next-style-optional-catch-all

Conversation

@mhartington
Copy link
Contributor

This allows for next-style optional catch-all routes.

PR Checklist

Closes # n/a

What is the new behavior?

For a more flexible routing setup, this allows for having a dynamic catch all routing setup, like nextjs provides.

For example, if you wanted to include a docs/ route, but did not want to hard-code every route that could be generated from it, you can use this new [[..slug]].page.ts syntax to support that.

.
└── app/
    ├── pages
    ├── docs/
    │   └── [[...slug]].page.ts  
    └── docs.page.ts

There's also an included example project for testing and validation that shows how this feature works in combination with markdown content.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

[optional] What gif best describes this PR or how it makes you feel?

Image

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for analog-docs ready!

Name Link
🔨 Latest commit 6725a4e
🔍 Latest deploy log https://app.netlify.com/projects/analog-docs/deploys/699d0ed1c1ff3a00089f2e99
😎 Deploy Preview https://deploy-preview-2043--analog-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for analog-app ready!

Name Link
🔨 Latest commit 6725a4e
🔍 Latest deploy log https://app.netlify.com/projects/analog-app/deploys/699d0ed144665900070e06d7
😎 Deploy Preview https://deploy-preview-2043--analog-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for analog-blog ready!

Name Link
🔨 Latest commit 6725a4e
🔍 Latest deploy log https://app.netlify.com/projects/analog-blog/deploys/699d0ed151a67e0008fab7aa
😎 Deploy Preview https://deploy-preview-2043--analog-blog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

This allows for next-style optional catch-all routes.
@mhartington
Copy link
Contributor Author

apologies for the delay here @brandonroberts. we're looking good in testing!

@brandonroberts
Copy link
Member

No worries, nice work!

@brandonroberts brandonroberts changed the title feat(router): optional catch all routes feat(router): support optional catch all routes Feb 24, 2026
@brandonroberts brandonroberts merged commit ba9fc09 into analogjs:beta Feb 24, 2026
18 checks passed
@SOG-web
Copy link
Contributor

SOG-web commented Feb 24, 2026

This came in right on time

Thanks @mhartington @brandonroberts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants