Replies: 1 comment 2 replies
-
The |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Body
Summary
Add double square brackets param for dynamic routes, make the param is optional in the double square brackets.
Background & Motivation
We need match URLs path:
/request-demo
/a/request-demo
/b/request-demo
now we have two same files:
/[slug]/request-demo.astro
/request-demo.astro
if slug is optional match, only need one file.
/[[slug]]/request-demo.astro
Also the [...slug] too,
Goals
/[slug]/request-demo.astro
match:/a/request-demo
/b/request-demo
/[[slug]]/request-demo.astro
match:/request-demo
/a/request-demo
/b/request-demo
/[...slug]/request-demo.astro
match:/a/request-demo
/a/b/request-demo
/[[...slug]]/request-demo.astro
match:/request-demo
/a/request-demo
/a/b/request-demo
Beta Was this translation helpful? Give feedback.
All reactions