Skip to content

Commit c2d894e

Browse files
dks333fmerian
andauthored
add docs for vercel subpath (#302)
* init * update doocs * Update pricing plan naming --------- Co-authored-by: flo merian <[email protected]>
1 parent a3789a2 commit c2d894e

File tree

5 files changed

+46
-7
lines changed

5 files changed

+46
-7
lines changed

advanced/subpath/cloudflare.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: "Host documentation at a /docs subpath using Cloudflare Workers"
55

66
import SubpathGatingSnippet from "/snippets/custom-subpath-gating.mdx";
77

8-
<SubpathGatingSnippet />
8+
<SubpathGatingSnippet platform="Cloudflare" />
99

1010
## Create Cloudflare Worker
1111

advanced/subpath/route53-cloudfront.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: "Host documentation at a /docs subdirectory using AWS services"
55

66
import SubpathGatingSnippet from "/snippets/custom-subpath-gating.mdx";
77

8-
<SubpathGatingSnippet />
8+
<SubpathGatingSnippet platform="AWS Services" />
99

1010
## Create Cloudfront Distribution
1111

advanced/subpath/vercel.mdx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: "Vercel"
3+
description: "Host documentation at a /docs subpath using Vercel"
4+
---
5+
6+
import SubpathGatingSnippet from "/snippets/custom-subpath-gating.mdx";
7+
8+
<SubpathGatingSnippet platform="Vercel" />
9+
10+
## Mint.json Configuration
11+
12+
To host your documentation at a custom subpath using Vercel, you need to add the
13+
following configuration to your `vercel.json` file.
14+
15+
```json
16+
{
17+
"rewrites": [
18+
{
19+
"source": "/docs",
20+
"destination": "https://[subdomain].mintlify.dev/docs"
21+
},
22+
{
23+
"source": "/docs/:match*",
24+
"destination": "https://[subdomain].mintlify.dev/docs/:match*"
25+
}
26+
]
27+
}
28+
```
29+
30+
<Note>
31+
For more information, you can also refer to Vercel's offical guide on check
32+
out the [Project Configuration:
33+
Rewrites](https://vercel.com/docs/projects/project-configuration#rewrites)
34+
</Note>
35+
36+
## Reach out to Mintlify team
37+
38+
Once completing the Vercel setup, the Mintlify team will setup the
39+
subdirectory settings in your deployment. Reach out over
40+
[email](mailto:[email protected]).

mint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@
161161
"group": "Custom Subpaths",
162162
"pages": [
163163
"advanced/subpath/cloudflare",
164-
"advanced/subpath/route53-cloudfront"
164+
"advanced/subpath/route53-cloudfront",
165+
"advanced/subpath/vercel"
165166
]
166167
},
167168
{

snippets/custom-subpath-gating.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<Info>
2-
3-
**Prerequisite**: Your primary domain (company.com) is hosted on Cloudflare
4-
and you are on the [Mintlify startup plan or
5-
above](https://mintlify.com/pricing).
2+
**Prerequisite**: Your primary domain (company.com) is hosted on {platform}
3+
and you are on the [Mintlify Pro plan or above](https://mintlify.com/pricing).
64
</Info>

0 commit comments

Comments
 (0)