Skip to content

Commit b63c37e

Browse files
committed
Add Type/MetaInfo components to redirects docs
1 parent 7906f4b commit b63c37e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content/partials/workers/redirects.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ params:
44
---
55

66
import { Code } from "@astrojs/starlight/components";
7-
import { Markdown, Render, Aside } from "~/components";
7+
import { Markdown, Render, Aside, Type, MetaInfo } from "~/components";
88

99
To apply custom redirects on {props.product === 'workers' ? 'a Worker with static assets' : 'Cloudflare Pages'}, declare your redirects in a plain text file called `_redirects` without a file extension, in the static asset directory of your project. This file will not itself be served as a static asset, but will instead be parsed by {props.product === 'workers' ? 'Workers' : 'Cloudflare Pages'} and its rules will be applied to static asset responses.
1010

@@ -30,18 +30,18 @@ Only one redirect can be defined per line and must follow this format, otherwise
3030
[source] [destination] [code?]
3131
```
3232

33-
- `source` required
33+
- `source` <Type text="string" /> <MetaInfo text="required" />
3434

3535
- A file path.
3636
- Can include [wildcards (`*`)](#splats) and [placeholders](#placeholders).
3737
- Because fragments are evaluated by your browser and not Cloudflare's network, any fragments in the source are not evaluated.
3838

39-
- `destination` required
39+
- `destination` <Type text="string" /> <MetaInfo text="required" />
4040

4141
- A file path or external link.
4242
- Can include fragments, query strings, [splats](#splats), and [placeholders](#placeholders).
4343

44-
- `code` default: `302`
44+
- `code` <Type text="number" /> <MetaInfo text="(default: 302) optional" />
4545

4646
- Optional parameter
4747

0 commit comments

Comments
 (0)