Skip to content

Commit ac14e91

Browse files
authored
Merge branch 'main' into michael/removeinitialvalue
2 parents ba8a3af + 20a8e66 commit ac14e91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2436
-1332
lines changed

.claude/CLAUDE.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Mintlify documentation
2+
3+
## Working relationship
4+
- You can push back on ideas-this can lead to better documentation. Cite sources and explain your reasoning when you do so
5+
- ALWAYS ask for clarification rather than making assumptions
6+
- NEVER lie, guess, or make up information
7+
8+
## Project context
9+
- Format: MDX files with YAML frontmatter
10+
- Config: docs.json for navigation, theme, settings
11+
- Components: Mintlify components
12+
13+
## Content strategy
14+
- Document just enough for user success - not too much, not too little
15+
- Prioritize accuracy and usability of information
16+
- Make content evergreen when possible
17+
- Search for existing information before adding new content. Avoid duplication unless it is done for a strategic reason
18+
- Check existing patterns for consistency
19+
- Start by making the smallest reasonable changes
20+
21+
## Frontmatter requirements for pages
22+
- title: Clear, descriptive page title
23+
- description: Concise summary for SEO/navigation
24+
25+
## Writing standards
26+
- Second-person voice ("you")
27+
- Prerequisites at start of procedural content
28+
- Test all code examples before publishing
29+
- Match style and formatting of existing pages
30+
- Include both basic and advanced use cases
31+
- Language tags on all code blocks
32+
- Alt text on all images
33+
- Relative paths for internal links
34+
- Use broadly applicable examples rather than overly specific business cases
35+
- Lead with context when helpful - explain what something is before diving into implementation details
36+
37+
### Style preferences (learned from content refresh project)
38+
#### Headings and formatting
39+
- Use sentence case for all headings ("Getting started", not "Getting Started")
40+
- Use "Properties" instead of "Props" for component documentation
41+
- Use sentence case for code block titles ("Expandable example", not "Expandable Example")
42+
43+
#### Component introductions
44+
- Start with action-oriented language: "Use [component] to..." rather than "The [component] component..."
45+
- Be specific about what components can contain or do
46+
- Make introductions practical and user-focused
47+
48+
#### Property descriptions
49+
- End all property descriptions with periods for consistency
50+
- Be specific and helpful rather than generic
51+
- Add scope clarification where needed (e.g., "For Font Awesome icons only:")
52+
- Use proper technical terminology ("boolean" not "bool")
53+
54+
#### Language and tone
55+
- Prefer active voice and direct language
56+
- Remove unnecessary words while maintaining clarity
57+
- Use "you complete" over "completing" for more direct communication
58+
- Break complex instructions into clear numbered steps
59+
- Make language more precise and contextual
60+
61+
#### Code examples
62+
- Keep examples simple and practical
63+
- Use consistent formatting and naming
64+
- Provide clear, actionable examples rather than showing multiple options when one will do
65+
66+
#### Content organization
67+
- Structure content in the order users need it
68+
- Combine related information to reduce redundancy
69+
- Use specific links (direct to relevant pages rather than generic dashboards)
70+
- Put most commonly needed information first
71+
72+
## Git workflow
73+
- NEVER use --no-verify when committing
74+
- Ask how to handle uncommitted changes before starting
75+
- Create a new branch when no clear branch exists for changes
76+
- Commit frequently throughout development
77+
- NEVER skip or disable pre-commit hooks
78+
79+
## Do not
80+
- Skip frontmatter on any MDX file
81+
- Use absolute URLs for internal links
82+
- Include untested code examples
83+
- Make assumptions - always ask for clarification

.cursor/rules/writing-standards.mdc

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ description: "Concise description explaining page purpose and value"
428428
- Verify all code examples are syntactically correct and executable
429429
- Test all links to ensure they are functional and lead to relevant content
430430
- Validate Mintlify component syntax with all required properties
431-
- Confirm proper heading hierarchy with H2 for main sections, H3 for subsections
431+
- Confirm proper heading hierarchy with H2 for main sections, H3 for subsections. Do not use H1 (reserved for page title)
432432
- Ensure content flows logically from basic concepts to advanced topics
433433
- Check for consistency in terminology, formatting, and component usage
434434
- Include appropriate warnings for destructive or security-sensitive actions
@@ -483,4 +483,30 @@ description: "Concise description explaining page purpose and value"
483483
- Regularly review and update outdated information
484484
- Remove deprecated features and references
485485
- Update screenshots when UI changes occur
486-
- Maintain consistency across related documentation pages
486+
- Maintain consistency across related documentation pages
487+
488+
## Request handling examples
489+
490+
### When asked to "create a new page":
491+
1. First, determine the appropriate location in the file structure
492+
2. Create the file with proper frontmatter
493+
3. Structure content using appropriate Mintlify components
494+
4. Include relevant images and code examples
495+
496+
### When asked to "improve existing content":
497+
1. Review current structure and identify gaps
498+
2. Suggest specific component improvements
499+
3. Add missing callouts or examples
500+
4. Ensure proper heading hierarchy
501+
502+
## Component selection decision trees
503+
504+
### For procedures:
505+
- Use <Steps> when: Sequential numbered instructions
506+
- Use <Tabs> when: Platform-specific alternatives
507+
- Use <AccordionGroup> when: Optional supplementary info
508+
509+
### For code examples:
510+
- Use single ``` when: One language, simple example
511+
- Use <CodeGroup> when: Same concept in multiple languages
512+
- Use <RequestExample>/<ResponseExample> when: API documentation

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Mintlify Documentation
2+
3+
Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command
4+
5+
```
6+
npm i -g mintlify
7+
```
8+
9+
Run the following command at the root of your documentation (where mint.json is)
10+
11+
```
12+
mintlify dev
13+
```

advanced/dashboard/roles.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: "Roles"
33
description: "Control access to your dashboard with roles."
44
---
55

6+
<Info>
7+
RBAC functionality is available on [Enterprise plan](https://mintlify.com/pricing?ref=rbac).
8+
</Info>
9+
610
Mintlify provides two dashboard access levels: Editor and Admin.
711

812
The following describes actions that are limited to the Admin role:

advanced/subpath/cloudflare.mdx

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@ Create a Cloudflare Worker by following the [Cloudflare Workers getting started
1919
If your DNS provider is Cloudflare, do not use proxying for the CNAME record.
2020
</Warning>
2121

22+
### Proxies with Vercel deployments
23+
24+
If you use Cloudflare as a proxy with Vercel deployments, you must ensure proper configuration to avoid conflicts with Vercel's domain verification and SSL certificate provisioning.
25+
26+
Improper proxy configuration can prevent Vercel from provisioning Let's Encrypt SSL certificates and cause domain verification failures.
27+
28+
#### Required path allowlist
29+
30+
Your Cloudflare Worker must allow traffic to these specific paths without blocking or redirecting:
31+
32+
- `/.well-known/acme-challenge/*` - Required for Let's Encrypt certificate verification
33+
- `/.well-known/vercel/*` - Required for Vercel domain verification
34+
35+
While Cloudflare automatically handles many verification rules, creating additional custom rules may inadvertently block this critical traffic.
36+
37+
#### Header forwarding requirements
38+
39+
Ensure that the `HOST` header is correctly forwarded in your Worker configuration. Failure to properly forward headers will cause verification requests to fail.
40+
2241
### Configure routing
2342

2443
In your Cloudflare dashboard, select **Edit Code** and add the following script into your Worker's code. See the [Cloudflare documentation](https://developers.cloudflare.com/workers-ai/get-started/dashboard/#development) for more information on editing a Worker.
@@ -35,6 +54,12 @@ addEventListener("fetch", (event) => {
3554
async function handleRequest(request) {
3655
try {
3756
const urlObject = new URL(request.url);
57+
58+
// If the request is to a Vercel verification path, allow it to pass through
59+
if (urlObject.pathname.startsWith('/.well-known/')) {
60+
return await fetch(request);
61+
}
62+
3863
// If the request is to the docs subdirectory
3964
if (/^\/docs/.test(urlObject.pathname)) {
4065
// Then Proxy to Mintlify
@@ -49,11 +74,13 @@ async function handleRequest(request) {
4974
proxyRequest.headers.set("Host", DOCS_URL);
5075
proxyRequest.headers.set("X-Forwarded-Host", CUSTOM_URL);
5176
proxyRequest.headers.set("X-Forwarded-Proto", "https");
77+
// If deploying to Vercel, preserve client IP
78+
proxyRequest.headers.set("CF-Connecting-IP", request.headers.get("CF-Connecting-IP"));
5279

5380
return await fetch(proxyRequest);
5481
}
5582
} catch (error) {
56-
// if no action found, play the regular request
83+
// If no action found, play the regular request
5784
return await fetch(request);
5885
}
5986
}
@@ -110,6 +137,12 @@ If you use Webflow to host your main site and want to serve Mintlify docs at `/d
110137
async function handleRequest(request) {
111138
try {
112139
const urlObject = new URL(request.url);
140+
141+
// If the request is to a Vercel verification path, allow it to pass through
142+
if (urlObject.pathname.startsWith('/.well-known/')) {
143+
return await fetch(request);
144+
}
145+
113146
// If the request is to the docs subdirectory
114147
if (/^\/docs/.test(urlObject.pathname)) {
115148
// Proxy to Mintlify
@@ -121,6 +154,8 @@ If you use Webflow to host your main site and want to serve Mintlify docs at `/d
121154
proxyRequest.headers.set("Host", DOCS_URL);
122155
proxyRequest.headers.set("X-Forwarded-Host", CUSTOM_URL);
123156
proxyRequest.headers.set("X-Forwarded-Proto", "https");
157+
// If deploying to Vercel, preserve client IP
158+
proxyRequest.headers.set("CF-Connecting-IP", request.headers.get("CF-Connecting-IP"));
124159
return await fetch(proxyRequest);
125160
}
126161
// Route everything else to main site

advanced/subpath/route53-cloudfront.mdx

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,31 @@ description: "Host documentation at a /docs subdirectory using AWS services"
66

77
import Propagating from "/snippets/custom-subpath-propagating.mdx";
88

9+
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.
10+
11+
## Proxies with Vercel deployments
12+
13+
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.
14+
15+
Improper CloudFront configuration can prevent Vercel from provisioning Let's Encrypt SSL certificates and cause domain verification failures.
16+
17+
### Required path allowlist
18+
19+
CloudFront must allow traffic to these specific paths without caching or blocking:
20+
21+
- `/.well-known/acme-challenge/*` - Required for Let's Encrypt certificate verification
22+
- `/.well-known/vercel/*` - Required for Vercel domain verification
23+
24+
These paths should be configured to bypass CloudFront caching and pass through directly to your origin.
25+
26+
### Header forwarding requirements
27+
28+
Ensure that CloudFront forwards the `HOST` header and client IP information correctly. This is critical for Vercel's verification processes.
29+
30+
When using CloudFront with Vercel deployments, CloudFront automatically adds the `CloudFront-Viewer-Address` header containing the original client's IP address.
31+
32+
Make sure your CloudFront distribution is configured to forward this header to your origin by including it in your origin request policy or cache policy headers configuration.
33+
934
## Create Cloudfront Distribution
1035

1136
Navigate to [Cloudfront](https://aws.amazon.com/cloudfront) inside the AWS console and click on `Create distribution`
@@ -70,19 +95,25 @@ Behaviors in Cloudfront enables control over the subpath logic. At a high level,
7095
- **If a user lands on /docs**, go to `[SUBDOMAIN].mintlify.dev`
7196
- **If a user lands on any other page**, go the current landing page
7297

73-
We're going to create three behaviors by clicking on the `Create behavior` button.
98+
Select the **Create behavior** button and create the following behaviors.
99+
100+
### `/.well-known/*`
101+
102+
If you are deploying to Vercel, create a behavior for Vercel verification paths with a **Path pattern** of `/.well-known/*` and **Origin and origin groups** pointing to your main origin (the staging URL).
103+
104+
For **Cache policy**, select `CachingDisabled` to ensure these verification requests pass through without caching.
74105

75106
### `/docs/*`
76107

77-
The first behavior should have a **Path pattern** of `/docs/*` with **Origin and origin groups** pointing to the `.mintlify.dev` URL (in our case `acme.mintlify.dev`)
108+
Create a behavior with a **Path pattern** of `/docs/*` with **Origin and origin groups** pointing to the `.mintlify.dev` URL (in our case `acme.mintlify.dev`)
78109

79110
<Frame>![Cloudfront Behavior 1](/images/cloudfront/behavior-1.png)</Frame>
80111

81112
For **Cache policy**, select `CachingOptimized` and create behavior.
82113

83114
### `/docs`
84115

85-
The second behavior should be the same as the first one but with a **Path pattern** of `/docs` and **Origin and origin groups** pointing to the same `.mintlify.dev` URL.
116+
Create a behavior with a **Path pattern** of `/docs` and **Origin and origin groups** pointing to the same `.mintlify.dev` URL.
86117

87118
<Frame>![Cloudfront Behavior 2](/images/cloudfront/behavior-2.png)</Frame>
88119

advanced/subpath/vercel.mdx

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@ title: "Vercel"
33
description: "Host documentation at a /docs subpath using Vercel"
44
---
55

6-
## vercel.json Configuration
6+
## vercel.json file
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+
The `vercel.json` file is Vercel's configuration file that allows you to customize how your project is built and deployed. It sits in your project's root directory and controls various aspects of your deployment, including routing, redirects, headers, and build settings.
9+
10+
We use the `rewrites` configuration to proxy requests from your main domain to your documentation.
11+
12+
Rewrites allow you to map incoming requests to different destinations without changing the URL in the browser. When someone visits `yoursite.com/docs`, Vercel will internally fetch content from `your-subdomain.mintlify.dev/docs` but the user will still see `yoursite.com/docs` in their browser. This is different from redirects, which would send users to a different URL entirely.
13+
14+
## Configuration
15+
16+
To host your documentation at a custom `/docs` subpath using Vercel, add the following configuration to your `vercel.json` file:
1017

1118
```json
1219
{
@@ -23,8 +30,38 @@ following configuration to your `vercel.json` file.
2330
}
2431
```
2532

26-
<Note>
27-
For more information, you can also refer to Vercel's offical guide on
28-
rewrites: [Project Configuration:
29-
Rewrites](https://vercel.com/docs/projects/project-configuration#rewrites)
30-
</Note>
33+
- **`source`**: The path pattern on your domain that triggers the rewrite.
34+
- **`destination`**: Where the request should be proxied to.
35+
- **`:match*`**: A wildcard that captures any path segments after `/docs/`.
36+
37+
38+
For more information, see [Configuring projects with vercel.json: Rewrites](https://vercel.com/docs/projects/project-configuration#rewrites) in the Vercel documentation.
39+
40+
## Using external proxies with Vercel
41+
42+
If you're using an external proxy (like Cloudflare or AWS CloudFront) in front of your Vercel deployment, you must configure it properly to avoid conflicts with Vercel's domain verification and SSL certificate provisioning.
43+
44+
Improper proxy configuration can prevent Vercel from provisioning Let's Encrypt SSL certificates and cause domain verification failures.
45+
46+
See the [supported providers](https://vercel.com/guides/how-to-setup-verified-proxy#supported-providers-verified-proxy-lite) in the Vercel documentation.
47+
48+
### Required path allowlist
49+
50+
Your external proxy must allow traffic to these specific paths without blocking, redirecting, or heavily caching:
51+
52+
- `/.well-known/acme-challenge/*` - Required for Let's Encrypt certificate verification
53+
- `/.well-known/vercel/*` - Required for Vercel domain verification
54+
55+
These paths should pass through directly to your Vercel deployment without modification.
56+
57+
### Header forwarding requirements
58+
59+
Ensure that your proxy correctly forwards the `HOST` header. Without proper header forwarding, verification requests will fail.
60+
61+
### Testing your proxy setup
62+
63+
To verify your proxy is correctly configured:
64+
65+
1. Test that `https://[yourdomain].com/.well-known/vercel/` returns a response.
66+
2. Ensure SSL certificates are provisioning correctly in your Vercel dashboard.
67+
3. Check that domain verification completes successfully.

0 commit comments

Comments
 (0)