Skip to content

Commit a12793a

Browse files
authored
Documentation edits made through Mintlify web editor
1 parent c3be25c commit a12793a

File tree

1 file changed

+54
-17
lines changed

1 file changed

+54
-17
lines changed

advanced/subpath/vercel.mdx

Lines changed: 54 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,67 @@
11
---
22
title: "Vercel"
3-
description: "Host documentation at a /docs subpath using Vercel"
3+
description: "Host documentation at a subpath using Vercel"
44
---
55

6-
## vercel.json Configuration
6+
ffdsafdsafd
77

8-
To host your documentation at a custom subpath using Vercel, you need to add the
9-
following configuration to your `vercel.json` file.
8+
<Steps>
9+
<Step title="Move your docs files">
10+
Edit your file structure so that all your files are within a folder which is your custom subpath. So if you want to host your docs at [my-cool-custom-domain.com/docs](http://my-cool-custom-domain.com/docs) you would do the following:
1011

11-
```json
12-
{
13-
"rewrites": [
14-
{
15-
"source": "/docs",
16-
"destination": "https://[subdomain].mintlify.dev/docs"
17-
},
12+
```
13+
/docs
14+
introduction.mdx
15+
navigation.mdx
16+
docs.json
17+
```
18+
</Step>
19+
<Step title="Configure your vercel.json">
20+
In your main website add the following rewrites to your `vercel.json`
21+
22+
```json
1823
{
19-
"source": "/docs/:match*",
20-
"destination": "https://[subdomain].mintlify.dev/docs/:match*"
24+
"rewrites": [
25+
{
26+
"source": "/api/request",
27+
"destination": "https://hahnbeeyeet.mintlify.app/api/request"
28+
},
29+
{
30+
"source": "/custom/subdirectory",
31+
"destination": "https://hahnbeeyeet.mintlify.app"
32+
},
33+
{
34+
"source": "/custom/subdirectory/llms.txt",
35+
"destination": "https://hahnbeeyeet.mintlify.app/llms.txt"
36+
},
37+
{
38+
"source": "/custom/subdirectory/llms-full.txt",
39+
"destination": "https://hahnbeeyeet.mintlify.app/llms-full.txt"
40+
},
41+
{
42+
"source": "/custom/subdirectory/sitemap.xml",
43+
"destination": "https://hahnbeeyeet.mintlify.app/sitemap.xml"
44+
},
45+
{
46+
"source": "/custom/subdirectory/robots.txt",
47+
"destination": "https://hahnbeeyeet.mintlify.app/robots.txt"
48+
},
49+
{
50+
"source": "/custom/subdirectory/:path*",
51+
"destination": "https://hahnbeeyeet.mintlify.app/custom/subdirectory/:path*"
52+
},
53+
{
54+
"source": "/mintlify-assets/:path+",
55+
"destination": "https://hahnbeeyeet.mintlify.app/mintlify-assets/:path+"
56+
}
57+
]
2158
}
22-
]
23-
}
24-
```
59+
```
60+
</Step>
61+
</Steps>
2562

2663
<Note>
2764
For more information, you can also refer to Vercel's offical guide on
2865
rewrites: [Project Configuration:
2966
Rewrites](https://vercel.com/docs/projects/project-configuration#rewrites)
30-
</Note>
67+
</Note>

0 commit comments

Comments
 (0)