Skip to content

Commit

Permalink
add information on regex redirects (#4306)
Browse files Browse the repository at this point in the history
  • Loading branch information
chdeskur authored Aug 14, 2024
1 parent f2d3cc2 commit 175477b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fern/pages/docs/building-your-docs/navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ tabs:
## Redirects
The `redirects` object allows you to redirect traffic from one path to another.
The `redirects` object allows you to redirect traffic from one path to another. You can also use [`regex`](https://www.npmjs.com/package/path-to-regexp) within redirects.

<CodeBlock title="docs.yml">
```yml
Expand All @@ -247,5 +247,7 @@ redirects:
destination: "/new-path"
- source: "/incorrect/path"
destination: "/correct/path"
- source: "/old-folder/:slug" # <- using regex
destination: "/new-folder/:slug"
```
</CodeBlock>

0 comments on commit 175477b

Please sign in to comment.