Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/update-search.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Update Mintlify Search

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

on:
push

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Install Mintlify Search Adapter
run: npm install -g @mintlify/search-ingest

- name: Update Mintlify Chunks
env:
MINTLIFY_API_HOST: ${{ secrets.MINTLIFY_API_HOST }}
MINTLIFY_API_KEY: ${{ secrets.MINTLIFY_API_KEY }}
MINTLIFY_ORGANIZATION_ID: ${{ secrets.MINTLIFY_ORGANIZATION_ID }}
MINTLIFY_DATASET_ID: ${{ secrets.MINTLIFY_DATASET_ID }}
NODE_OPTIONS: --max-old-space-size=8192
run: "mintlify-search-ingest --path . -r https://cursor.com/docs"
25 changes: 24 additions & 1 deletion advanced/subpath/route53-cloudfront.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@

To host your documentation at a `/docs` subpath using AWS Route 53 and CloudFront, you need to configure your DNS provider to point to your CloudFront distribution.

## Proxies with Vercel deployments

Check warning on line 11 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L11

Did you really mean 'Vercel'?

If you use AWS CloudFront as a proxy with Vercel deployments, you must configure CloudFront to avoid interfering with Vercel's domain verification and SSL certificate provisioning.

Check warning on line 13 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L13

Did you really mean 'Vercel'?

Check warning on line 13 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L13

Did you really mean 'Vercel's'?

Improper CloudFront configuration can prevent Vercel from provisioning Let's Encrypt SSL certificates and cause domain verification failures.

Check warning on line 15 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L15

Did you really mean 'Vercel'?

### Required path allowlist

Check warning on line 17 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L17

Did you really mean 'allowlist'?

CloudFront must allow traffic to these specific paths without caching or blocking:

- `/.well-known/acme-challenge/*` - Required for Let's Encrypt certificate verification
- `/.well-known/vercel/*` - Required for Vercel domain verification

Check warning on line 22 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L22

Did you really mean 'Vercel'?

These paths should be configured to bypass CloudFront caching and pass through directly to your origin.

### Header forwarding requirements

You must create a custom origin request policy that forwards the `HOST` header and client IP information correctly. This is critical for Vercel's verification processes.

Check warning on line 28 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L28

Did you really mean 'Vercel's'?

1. Create a custom origin request policy named `VercelCloudFrontProxy`.
2. Include the `Origin` and `CloudFront-Viewer-Address` headers.
Expand Down Expand Up @@ -67,9 +67,9 @@
2. Find your staging URL that mirrors the main domain. This is highly variant depending on how your landing page is hosted. For example, the Mintlify staging URL is [mintlify-landing-page.vercel.app](https://mintlify-landing-page.vercel.app).

<Info>
If your landing page is hosted on Webflow, use Webflow's staging URL. It would look like `.webflow.io`.

Check warning on line 70 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L70

Did you really mean 'Webflow'?

Check warning on line 70 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L70

Did you really mean 'Webflow's'?

If you use Vercel, use the `.vercel.app` domain available for every project.

Check warning on line 72 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L72

Did you really mean 'Vercel'?
</Info>

3. Create a new Origin and add your staging URL as the "Origin domain".
Expand All @@ -86,7 +86,7 @@

## Set behaviors

Behaviors in CloudFront enable control over the subpath logic. At a high level, we're looking to create the following logic.

Check warning on line 89 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L89

Did you really mean 'subpath'?

- **If a user lands on /docs**, go to `[SUBDOMAIN].mintlify.dev`.
- **If a user lands on any other page**, go the current landing page.
Expand All @@ -101,7 +101,7 @@

### `/.well-known/*`

Create behaviors for Vercel domain verification paths with a **Path pattern** of `/.well-known/*` and set **Origin and origin groups** to your docs URL.

Check warning on line 104 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L104

Did you really mean 'Vercel'?

For "Cache policy", select **CachingDisabled** to ensure these verification requests pass through without caching.

Expand All @@ -110,8 +110,8 @@
</Frame>

<Info>
If `.well-known/*` is too generic, it can be narrowed down to 2 behaviors at a minimum for Vercel:

Check warning on line 113 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L113

Did you really mean 'Vercel'?
- `/.well-known/vercel/*` - Required for Vercel domain verification

Check warning on line 114 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L114

Did you really mean 'Vercel'?
- `/.well-known/acme-challenge/*` - Required for Let's Encrypt certificate verification
</Info>

Expand Down Expand Up @@ -158,6 +158,29 @@

2. Select **Save changes**.

### Additional behaviors for layout stability

To prevent layout shifts and ensure smooth navigation, add these additional behaviors for static asset handling:

#### `/mintlify-assets/_next/static/*`

Create a behavior with a **Path pattern** of `/mintlify-assets/_next/static/*` to serve static assets efficiently:

- Set **Origin and origin groups** to your `.mintlify.dev` URL
- Set **Cache policy** to **CachingOptimized**
- Set **Origin request policy** to **AllViewerExceptHostHeader**

This behavior should be ordered **above** the default behavior in your behaviors list, as CloudFront evaluates them in order.

#### Update default behavior for app router navigation

For your **Default (*)** behavior, ensure these settings to handle HTML and app router navigation properly:

- Set **Cache policy** to **CachingDisabled** (since RSC ?_rsc= payloads vary and shouldn't be cached)
- Set **Origin request policy** to **AllViewerExceptHostHeader**

These configurations prevent the sidenav from snapping up and down during navigation by ensuring only the new page's MDX content is fetched while keeping layout assets stable.

Check warning on line 182 in advanced/subpath/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

advanced/subpath/route53-cloudfront.mdx#L182

Did you really mean 'sidenav'?

### Check behaviors are set up correctly

If you follow the above steps, your behaviors should look like this:
Expand Down Expand Up @@ -208,4 +231,4 @@

Your documentation is now live at `/docs` for your primary domain.

<Propagating />
<Propagating />