diff --git a/advanced/subpath/cloudflare.mdx b/advanced/subpath/cloudflare.mdx index 16fd5a226..096eee139 100644 --- a/advanced/subpath/cloudflare.mdx +++ b/advanced/subpath/cloudflare.mdx @@ -5,7 +5,7 @@ description: "Host documentation at a /docs subpath using Cloudflare Workers" import SubpathGatingSnippet from "/snippets/custom-subpath-gating.mdx"; - + ## Create Cloudflare Worker diff --git a/advanced/subpath/route53-cloudfront.mdx b/advanced/subpath/route53-cloudfront.mdx index bf7826e9c..e181941d2 100644 --- a/advanced/subpath/route53-cloudfront.mdx +++ b/advanced/subpath/route53-cloudfront.mdx @@ -5,7 +5,7 @@ description: "Host documentation at a /docs subdirectory using AWS services" import SubpathGatingSnippet from "/snippets/custom-subpath-gating.mdx"; - + ## Create Cloudfront Distribution diff --git a/advanced/subpath/vercel.mdx b/advanced/subpath/vercel.mdx new file mode 100644 index 000000000..d044e8273 --- /dev/null +++ b/advanced/subpath/vercel.mdx @@ -0,0 +1,40 @@ +--- +title: "Vercel" +description: "Host documentation at a /docs subpath using Vercel" +--- + +import SubpathGatingSnippet from "/snippets/custom-subpath-gating.mdx"; + + + +## Mint.json Configuration + +To host your documentation at a custom subpath using Vercel, you need to add the +following configuration to your `vercel.json` file. + +```json +{ + "rewrites": [ + { + "source": "/docs", + "destination": "https://[subdomain].mintlify.dev/docs" + }, + { + "source": "/docs/:match*", + "destination": "https://[subdomain].mintlify.dev/docs/:match*" + } + ] +} +``` + + + For more information, you can also refer to Vercel's offical guide on check + out the [Project Configuration: + Rewrites](https://vercel.com/docs/projects/project-configuration#rewrites) + + +## Reach out to Mintlify team + +Once completing the Vercel setup, the Mintlify team will setup the +subdirectory settings in your deployment. Reach out over +[email](mailto:sales@mintlify.com). diff --git a/mint.json b/mint.json index edd49b756..4afececea 100644 --- a/mint.json +++ b/mint.json @@ -155,7 +155,8 @@ "group": "Custom Subpaths", "pages": [ "advanced/subpath/cloudflare", - "advanced/subpath/route53-cloudfront" + "advanced/subpath/route53-cloudfront", + "advanced/subpath/vercel" ] }, { diff --git a/snippets/custom-subpath-gating.mdx b/snippets/custom-subpath-gating.mdx index 24f8cb1cb..1c9f8e1b4 100644 --- a/snippets/custom-subpath-gating.mdx +++ b/snippets/custom-subpath-gating.mdx @@ -1,6 +1,4 @@ - - **Prerequisite**: Your primary domain (company.com) is hosted on Cloudflare - and you are on the [Mintlify startup plan or - above](https://mintlify.com/pricing). + **Prerequisite**: Your primary domain (company.com) is hosted on {platform} + and you are on the [Mintlify Pro plan or above](https://mintlify.com/pricing).