From 81a6833d7149a0593a40d3c809e3340da4c7211e Mon Sep 17 00:00:00 2001 From: "Kaishan (Sam) Ding" Date: Mon, 21 Oct 2024 12:31:47 -0700 Subject: [PATCH 1/3] init --- advanced/subpath/cloudflare.mdx | 2 +- advanced/subpath/route53-cloudfront.mdx | 2 +- advanced/subpath/vercel.mdx | 28 +++++++++++++++++++++++++ mint.json | 3 ++- snippets/custom-subpath-gating.mdx | 6 ++---- 5 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 advanced/subpath/vercel.mdx 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..566f01fd7 --- /dev/null +++ b/advanced/subpath/vercel.mdx @@ -0,0 +1,28 @@ +--- +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 `mint.json` file. + +```json +{ + "rewrites": [ + { + "source": "/docs", + "destination": "https://[subdomain].mintlify.dev/docs" + }, + { + "source": "/docs/:match*", + "destination": "https://[subdomain].mintlify.dev/docs/:match*" + } + ] +} +``` 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..6b75129f4 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 startup plan or above](https://mintlify.com/pricing). From e5f0c00de0ed340c3f2e77302e654c21fc734671 Mon Sep 17 00:00:00 2001 From: "Kaishan (Sam) Ding" Date: Mon, 21 Oct 2024 13:51:29 -0700 Subject: [PATCH 2/3] update doocs --- advanced/subpath/vercel.mdx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/advanced/subpath/vercel.mdx b/advanced/subpath/vercel.mdx index 566f01fd7..d044e8273 100644 --- a/advanced/subpath/vercel.mdx +++ b/advanced/subpath/vercel.mdx @@ -10,7 +10,7 @@ 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 `mint.json` file. +following configuration to your `vercel.json` file. ```json { @@ -26,3 +26,15 @@ following configuration to your `mint.json` file. ] } ``` + + + 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). From e7d738c189c4426326b85443509096fc9af47789 Mon Sep 17 00:00:00 2001 From: flo merian Date: Tue, 22 Oct 2024 00:17:15 +0200 Subject: [PATCH 3/3] Update pricing plan naming --- snippets/custom-subpath-gating.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/custom-subpath-gating.mdx b/snippets/custom-subpath-gating.mdx index 6b75129f4..1c9f8e1b4 100644 --- a/snippets/custom-subpath-gating.mdx +++ b/snippets/custom-subpath-gating.mdx @@ -1,4 +1,4 @@ **Prerequisite**: Your primary domain (company.com) is hosted on {platform} - and you are on the [Mintlify startup plan or above](https://mintlify.com/pricing). + and you are on the [Mintlify Pro plan or above](https://mintlify.com/pricing).