Skip to content

Commit

Permalink
docs: refine dynamic routes documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Valerio Ageno committed Dec 14, 2024
1 parent bb4a430 commit 4ff99b5
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ you can use dynamic segments, which are populated at request time.
A dynamic segment can be created by wrapping a
file or a folder name in square brackets: `[segmentName]`.

You are going to probably use something like:
The dynamic segment can be used in both folder and file name:

- `[id]`
- `[slug]`
- `src/routes/blog/[slug].tsx`
- `src/routes/blog/[slug]/index.tsx`

The same path can have multiple dynamic segments:

- `src/routes/blog/[post]/[comment].tsx`

### Example

Expand Down

0 comments on commit 4ff99b5

Please sign in to comment.