diff --git a/advanced/subpath/cloudflare.mdx b/advanced/subpath/cloudflare.mdx
index 763b44ed..3319ebf6 100644
--- a/advanced/subpath/cloudflare.mdx
+++ b/advanced/subpath/cloudflare.mdx
@@ -7,46 +7,20 @@ import SubpathGatingSnippet from "/snippets/custom-subpath-gating.mdx";
-## Create Cloudflare Worker
+## Setup Instructions
-Navigate to the `Workers & Pages > Create application > Create worker`. You
-should be able to presented with the following screen where you can create a new
-Cloudlfare worker.
+1. Create a new Cloudflare Worker at `Workers & Pages > Create application > Create worker`
-
-
-
+2. Add your custom domain:
+ - Go to `Settings > Triggers`
+ - Click `Add Custom Domain`
+ - Add your domain (with and without `www.`)
-### Add custom domain
-
-Once the worker is created, click `Configure worker`. Navigate to the worker
-`Settings > Triggers`. Click on `Add Custom Domain` to add your desired domain
-into the list - we recommend you add both the version with and without `www.`
-prepended to the domain.
-
-
-
-
-
-If you have trouble setting up a custom subdirectory,
-[contact our support team](mailto:sales@mintlify.com) and we'll walk you through
-upgrading your hosting with us.
-
-### Edit Worker Script
-
-Click on `Edit Code` and add the following script into the worker's code.
-
-
-
-
-
-
- Edit `DOCS_URL` by replacing `[SUBDOMAIN]` with your unique subdomain and
- `CUSTOM_URL` with your website's base URL.
-
+3. Add the worker script:
+ - Click `Edit Code`
+ - Copy the script below
+ - Replace `[SUBDOMAIN]` and `[YOUR_DOMAIN]` with your values
+ - Click `Deploy`
```javascript
addEventListener("fetch", (event) => {
@@ -80,5 +54,6 @@ async function handleRequest(request) {
}
```
-Click on `Deploy` and wait for the changes to propagate (it can take up to a few
-hours).
+
+Changes may take a few hours to propagate. For setup assistance, [contact our support team](mailto:sales@mintlify.com).
+
\ No newline at end of file
diff --git a/advanced/user-auth/oauth.mdx b/advanced/user-auth/oauth.mdx
index 98251eb9..aba3f442 100644
--- a/advanced/user-auth/oauth.mdx
+++ b/advanced/user-auth/oauth.mdx
@@ -1,41 +1,41 @@
---
title: 'OAuth 2.0'
-description: 'Integrate with your OAuth server to enable user login via the PKCE flow'
+description: 'Enable user login via OAuth PKCE flow'
---
-If you have an existing OAuth server that supports the PKCE flow, you can integrate with Mintlify for a seamless login experience.
+Integrate your existing OAuth server with Mintlify for user authentication using the PKCE flow.
-## Implementation
+## Setup Steps
-
- Create an API endpoint that can be accessed with an OAuth access token, and responds with a JSON payload following the [UserInfo](./sending-data) format. Take note of the scope or scopes required to access this endpoint.
+
+ Create an API endpoint that:
+ - Accepts an OAuth access token
+ - Returns user data in [UserInfo](./sending-data) format
+ - Has defined scope requirements
-
- Go to your [Mintlify dashboard settings](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/user-authentication), select the OAuth option, and fill out the required fields:
-
- - **Authorization URL**: The base URL for the authorization request, to which we will add the appropriate query parameters.
- - **Client ID**: An ID for the OAuth 2.0 client to be used.
- - **Scopes**: An array of scopes that will be requested.
- - **Token URL**: The base URL for the token exchange request.
- - **Info API URL**: The endpoint that will be hit to retrieve user info.
+
+ In your [Mintlify dashboard](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/user-authentication):
+ - Select OAuth option
+ - Enter Authorization URL
+ - Provide Client ID
+ - List required Scopes
+ - Add Token URL
+ - Input Info API URL
-
- Copy the Redirect URL listed in the [Mintlify dashboard settings](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/user-authentication) and add it as an authorized redirect URL for your OAuth server.
+
+ Copy the Redirect URL from your Mintlify dashboard and add it to your OAuth server's authorized redirects.
-## Example
-
-I have an existing OAuth server that supports the PKCE flow. I want to set up authentication for my docs hosted at `foo.com/docs`.
-
-To set up authentication with Mintlify, I create an endpoint `api.foo.com/docs/user-info` which requires an OAuth access token with the `docs-user-info` scope, and responds with the user's custom data according to Mintlify’s specification.
-
-I then go to the Mintlify dashboard settings, navigate to the User Auth settings, select OAuth, and enter the relevant values for the OAuth flow and Info API endpoint:
-- **Authorization URL**: `https://auth.foo.com/authorization`
-- **Client ID**: `ydybo4SD8PR73vzWWd6S0ObH`
-- **Scopes**: `['docs-user-info']`
-- **Token URL**: `https://auth.foo.com/exchange`
-- **Info API URL**: `https://api.foo.com/docs/user-info`
-
-Finally, I copy the Redirect URL displayed in the dashboard settings and add it as an authorized redirect URL in my OAuth client configuration settings.
+## Quick Example
+
+```json
+{
+ "authorizationUrl": "https://auth.foo.com/authorization",
+ "clientId": "ydybo4SD8PR73vzWWd6S0ObH",
+ "scopes": ["docs-user-info"],
+ "tokenUrl": "https://auth.foo.com/exchange",
+ "infoApiUrl": "https://api.foo.com/docs/user-info"
+}
+```
\ No newline at end of file
diff --git a/advanced/user-auth/shared-session.mdx b/advanced/user-auth/shared-session.mdx
index d2925a26..8243b9c8 100644
--- a/advanced/user-auth/shared-session.mdx
+++ b/advanced/user-auth/shared-session.mdx
@@ -3,48 +3,37 @@ title: 'Shared Session Auth'
description: 'Seamlessly share user sessions between your dashboard and your docs'
---
-This method utilizes the session authentication info already stored in your user’s browser to create a seamless documentation experience.
+Share your existing user authentication between your dashboard and documentation for a seamless experience.
## Implementation
- Create an API endpoint that uses session authentication to identify users, and responds with a JSON payload following the [UserInfo](./sending-data) format.
-
- If the API domain does not *exactly match* the docs domain:
- - Add the docs domain to your API's `Access-Control-Allow-Origin` header (must not be `*`)
- - Ensure your API’s `Access-Control-Allow-Credentials` header is `true`
-
- These CORS options only need to be enabled on the *single endpoint* responsible for returning user information. We do not recommend enabling these options on all dashboard endpoints.
-
+ Create an API endpoint that:
+ - Uses your existing session authentication
+ - Returns user data in the [UserInfo](./sending-data) format
+ - Includes proper CORS headers if your API and docs domains differ:
+ ```
+ Access-Control-Allow-Origin: your-docs-domain.com
+ Access-Control-Allow-Credentials: true
+ ```
+
+
+ Only enable these CORS settings on your user info endpoint, not across all API routes.
+
-
- Go to your [Mintlify dashboard settings](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/user-authentication) and add the API URL and your Login URL to your User Auth settings.
+
+ Add your API URL and Login URL in your [Mintlify dashboard settings](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/user-authentication).
-## Examples
-
-### Dashboard at subdomain, docs at subdomain
-
-I have a dashboard at `dash.foo.com`, which uses cookie-based session authentication. My dashboard API routes are hosted at `dash.foo.com/api`. I want to set up authentication for my docs hosted at `docs.foo.com`.
-
-To set up authentication with Mintlify, I create another dashboard endpoint `dash.foo.com/api/docs/user-info` which identifies the user using session auth, and responds with their custom data according to Mintlify’s specification. I then add `https://docs.foo.com` to the `Access-Control-Allow-Origin` allow-list **for this route only**, and ensure my `Access-Control-Allow-Credentials` configuration is set to `true` **for this route only**.
-
-I then go to the Mintlify dashboard settings and enter `https://dash.foo.com/api/docs/user-info` for the API URL field.
-
-### Dashboard at subdomain, docs at root
-
-I have a dashboard at `dash.foo.com`, which uses cookie-based session authentication. My dashboard API routes are hosted at `dash.foo.com/api`. I want to set up authentication for my docs hosted at `foo.com/docs`.
-
-To set up authentication with Mintlify, I create another dashboard endpoint `dash.foo.com/api/docs/user-info` which identifies the user using session auth, and responds with their custom data according to Mintlify’s specification. I then add `https://foo.com` to the `Access-Control-Allow-Origin` allow-list **for this route only**, and ensure my `Access-Control-Allow-Credentials` configuration is set to `true` **for this route only**.
-
-I then go to the Mintlify dashboard settings and enter `https://dash.foo.com/api/docs/user-info` for the API URL field.
-
-### Dashboard at root, docs at root
+## Example Setup
-I have a dashboard at `foo.com/dashboard`, which uses cookie-based session authentication. My dashboard API routes are hosted at `foo.com/api`. I want to set up authentication for my docs hosted at `foo.com/docs`.
+Your setup will depend on where your dashboard and docs are hosted:
-To set up authentication with Mintlify, I create another dashboard endpoint `foo.com/api/docs/user-info` which identifies the user using session auth, and responds with their custom data according to Mintlify’s specification.
+- **Same domain** (e.g., `foo.com/dashboard` and `foo.com/docs`):
+ No special CORS configuration needed
-I then go to the Mintlify dashboard settings and enter `https://foo.com/api/docs/user-info` for the API URL field.
\ No newline at end of file
+- **Different subdomains** (e.g., `dash.foo.com` and `docs.foo.com`):
+ Configure CORS headers for the docs domain on your user info endpoint
+
\ No newline at end of file
diff --git a/advanced/widget/chat.mdx b/advanced/widget/chat.mdx
index 216179a7..77b6f4f0 100644
--- a/advanced/widget/chat.mdx
+++ b/advanced/widget/chat.mdx
@@ -2,19 +2,18 @@
title: "Chat Widget"
---
-Integrate the Mintlify widget into your products to offer users quick access to AI-powered chat with your docs content as the knowledge base.
+Integrate the Mintlify widget to provide AI-powered chat using your docs as the knowledge base.

## Getting started
-First, generate an API key in [the Mintlify dashboard](https://dashboard.mintlify.com/chat/widget-auth).
+1. Generate an API key in [the Mintlify dashboard](https://dashboard.mintlify.com/chat/widget-auth)
+2. Add the widget to your site using one of these methods:
-
+### HTML Installation
-## Installation
-
-Add the widget by adding these script tags into your site's `
...
` tag.
+Add to your site's `
` tag:
```html
```
-To use the widget in React and Next.js apps, use the React component from the `@mintlify/widget-react` [package](https://www.npmjs.com/package/@mintlify/widget-react). Here is a basic example of how to use the component in your React application:
+### React Installation
+
+Install and use the `@mintlify/widget-react` package:
```jsx
```
-## Usage
-
-In the first script tag or the React component props, you can customize the appearance and other settings of the widget. `mintlifyWidgetSettings` accepts the following props:
-
-| Prop | Type | Description |
-| ------------ | ------------------------------------------------------------------- | ---------------------------------------------------------- |
-| `connection` | [MintlifyWidgetConnectionProps](#mintlifywidgetconnectionProps) | Information needed to connect to our API. Required. |
-| `display?` | [MintlifyWidgetDisplayProps](#mintlifywidgetdisplayProps) | Configurations for the widget appearance and interactions. |
-| `tracking?` | [MintlifyWidgetTrackingFunctions](#mintlifywidgettrackingfunctions) | Callback functions for tracking analytics. |
-
-### MintlifyWidgetConnectionProps
-
-| Prop | Type | Description |
-| -------- | -------- | ----------------------------------------------------------- |
-| `apiKey` | `string` | Widget API key generated from Mintlify dashboard. Required. |
-| `url?` | `string` | Used for internal testing only |
-
-### MintlifyWidgetDisplayProps
-
-| Prop | Type | Description |
-| ------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------- |
-| `trigger?` | [MintlifyWidgetDisplayTriggerProps](#mintlifywidgetdisplaytriggerprops) | Appearance of the trigger. |
-| `colors?` | [MintlifyWidgetDisplayColorsProps](#mintlifywidgetdisplaycolorsprops) | Colors used across the widget. |
-| `chat?` | [MintlifyWidgetDisplayChatProps](#mintlifywidgetdisplaychatprops) | Configs specific to AI chat. |
-| `isDarkMode?` | `boolean` | Controlled dark mode appearance. Defaults to OS preference. |
-
-#### MintlifyWidgetDisplayTriggerProps
-
-| Prop | Type | Description |
-| ------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
-| `type?` | `'button'`\|`'input'` | Type of the trigger to display. Defaults to `button`. |
-| `label?` | `string` | Label displayed in the trigger. Defaults to `Get help` for the button trigger and `Ask anything...` for the input trigger. |
-| `buttonIcon?` | `'chat'`\|`'sparkles'`\|`'mintlify'` | Icon used in the trigger. Only available for the `button` trigger. Defaults to `chat`. |
-| `iconOnly?` | `boolean` | Only show icon in the trigger or not. Defaults to `false`. |
-
-Here is an overview of what the trigger looks like with different configurations.
-
-| `type='input'` | |
-| -------------- | ------------------------------------------------------------ |
-| | |
-
-| `type='button'` | `'chat'` | `'sparkles'` | `'mintlify'` |
-| ---------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
-| `iconOnly=false` | | | |
-| `iconOnly=true` | | | |
-
-#### MintlifyWidgetDisplayColorsProps
-
-| Prop | Type | Description |
-| --------------- | -------- | -------------------------------------------------------- |
-| `primary?` | `string` | Primary color used in the widget. Defaults to `#0D9373`. |
-| `primaryLight?` | `string` | Primary color in dark mode. Defaults to `#55D799`. |
-
-#### MintlifyWidgetDisplayChatProps
+## Configuration Options
-| Prop | Type | Description |
-| ------------------------ | ---------- | ------------------------------------------------------------------ |
-| `openCitationInSameTab?` | `boolean` | Open the citation url in the same tab or not. Defaults to `false`. |
-| `exampleQueries?` | `string[]` | Example queries to prompt the user to ask. Defaults to `[]`. |
+The widget can be customized using these main props:
-### MintlifyWidgetTrackingFunctions
+| Prop | Description |
+| ------------ | ---------------------------------------------------------- |
+| `connection` | Required. API connection settings (`apiKey` required) |
+| `display` | Optional. Widget appearance and interaction settings |
+| `tracking` | Optional. Analytics callback functions |
-| Prop | Type | Description |
-| --------------------- | ------------------------------------------ | -------------------------------------------------- |
-| `trackChatEnter` | `()=> void` | Triggered when the user opens the chat widget. |
-| `trackCitationClick` | `(title: string, url: string)=> void` | Triggered when the user clicks on a citation. |
-| `trackChatThumbsUp` | `(query: string, response: string)=> void` | Triggered when the user thumbs up on a response. |
-| `trackChatThumbsDown` | `(query: string, response: string)=> void` | Triggered when the user thumbs down on a response. |
-| `trackChatFollowup` | `(query: string)=> void` | Triggered when the user asks a question. |
-| `trackChatClose` | `(queriesCount: number)=> void` | Triggered when the user exits the chat widget. |
+For detailed configuration options and customization, visit our [full documentation](https://mintlify.com/docs/api-playground/chat-widget).
\ No newline at end of file
diff --git a/api-playground/openapi/setup.mdx b/api-playground/openapi/setup.mdx
index 7d45da4f..aea0e667 100644
--- a/api-playground/openapi/setup.mdx
+++ b/api-playground/openapi/setup.mdx
@@ -3,147 +3,61 @@ title: "OpenAPI Setup"
description: "Reference OpenAPI endpoints in your docs pages"
---
-## Add an OpenAPI specification file
+## Add an OpenAPI Specification
-To describe your endpoints with OpenAPI, make sure you have a valid OpenAPI
-document in either JSON or YAML format that follows the
-[OpenAPI specification](https://swagger.io/specification/). Your document must
-follow OpenAPI specification 3.0+.
+Start with a valid OpenAPI document (version 3.0+) in either JSON or YAML format that follows the [OpenAPI specification](https://swagger.io/specification/).
-## Auto-populate API pages
+## Display API Documentation
-The fastest way to get started with OpenAPI is to add an `openapi` field to a tab or anchor in the `mint.json`. This field can contain either the path to an OpenAPI document in your docs repo, or the URL of a hosted OpenAPI document. Mintlify will automatically generate a page for each OpenAPI operation and place them in the tab/anchor.
+There are two ways to display your OpenAPI documentation:
-**Example with Anchors:**
+### 1. Auto-populate API Pages
-```json {5}
+Add an `openapi` field to your `mint.json` configuration to automatically generate API pages:
+
+```json
{
"anchors": [
{
"name": "API Reference",
"openapi": "/path/to/openapi.json",
- "url": "api-reference",
- "icon": "square-terminal"
- }
- ]
-}
-```
-
-
-
-**Example with Tabs:**
-
-```json {6}
-{
- "tabs": [
- {
- "name": "API Reference",
- "url": "api-reference",
- "openapi": "https://petstore3.swagger.io/api/v3/openapi.json"
+ "url": "api-reference"
}
]
}
```
-
+### 2. Create Custom MDX Pages
-When using this option, the metadata for the generated pages will have the following default values:
+For more customization, create individual MDX pages for each API endpoint:
-* `title`: The `summary` field from the OpenAPI operation, if present. Otherwise a title generated from the HTTP method and endpoint.
-
-* `description`: The `description` field from the OpenAPI operation, if present.
-
-* `version`: The `version` value from the anchor or tab, if present.
-
-There are some scenarios in which the default behavior isn't sufficient. If you need more customizability, you can create an MDX page for your OpenAPI operation, and modify it just like any other MDX page.
-
-## Create MDX files for API pages
-
-If you want to customize the page metadata, add additional content, omit certain OpenAPI operations, or reorder OpenAPI pages in your navigation, you'll need an MDX page for each operation. Here is [an example MDX OpenAPI page](https://github.com/elevenlabs/elevenlabs-docs/blob/e5e267c97b8d1e4c21db1dcdb8b005eb1dfed7da/api-reference/speech-to-speech.mdx?plain=1#L2) from [Elevenlabs](https://elevenlabs.io/docs/api-reference/speech-to-speech).
-
-
-
-### Autogenerate files
-
-For large OpenAPI documents, creating one MDX page for each OpenAPI operation can be a lot of work. To make it easier, we created a local OpenAPI page scraper.
-
-Our Mintlify [scraper](https://www.npmjs.com/package/@mintlify/scraping)
-autogenerates MDX files for your OpenAPI endpoints. Use the relative path to the
-OpenAPI document in your codebase.
-
-```bash
-npx @mintlify/scraping@latest openapi-file
-```
-
-Add the `-o` flag to specify a folder to populate the files into. If a folder is
-not specified, the files will populate in the working directory.
+#### Automatic Generation
+Use our scraper to generate MDX files:
```bash
npx @mintlify/scraping@latest openapi-file -o api-reference
```
-Learn more about our scraping package [here](https://www.npmjs.com/package/@mintlify/scraping).
-
-The scraper will output an array of
-[Navigation entries](/settings/global#structure) containing your OpenAPI MDX
-files. You can either append these entries to your existing Navigation, or
-reorder and add the files to your navigation manually.
-
-
- If your OpenAPI document is invalid, the files will not autogenerate.
-
-
-### Manually specify files
-
-You can always create an MDX page manually, and reference the OpenAPI operation in the page's metadata using the `openapi` field.
-
-
+#### Manual Creation
+Create an MDX file with OpenAPI reference:
-By using the OpenAPI reference, the name, description, parameters, responses,
-and the API playground will be automatically generated from the OpenAPI document.
-
-If you have multiple OpenAPI files, include the path to the OpenAPI file to ensure Mintlify finds the correct OpenAPI document. This is not required if you have
-only one OpenAPI file - it will automatically detect your OpenAPI file.
-
-
- ```md Example
- ---
- title: "Get users"
- openapi: "/path/to/openapi-1.json GET /users"
- ---
- ```
-
- ```md Format
- ---
- title: "title of the page"
- openapi: openapi-file-path method path
- ---
- ```
-
-
-
+```md
+---
+title: "Get users"
+openapi: "GET /users"
+---
+```
- The method and path must match the method and path specified in the OpenAPI
- document exactly. If the endpoint doesn't exist in the OpenAPI file,
- the page will be empty.
+ If you have multiple OpenAPI files, specify the file path: `openapi: "/path/to/openapi.json GET /users"`
-## Create MDX files for OpenAPI schemas
-
-Mintlify also allows you to create individual pages for any OpenAPI schema
-defined in an OpenAPI document's `components.schemas` field:
+## Schema Documentation
-
- ```md Example
- ---
- openapi-schema: OrderItem
- ---
- ```
+To document OpenAPI schemas, create an MDX file with:
- ```md Format
- ---
- openapi-schema: "schema-key"
- ---
- ```
-
\ No newline at end of file
+```md
+---
+openapi-schema: "SchemaName"
+---
+```
\ No newline at end of file
diff --git a/api-playground/openapi/writing-openapi.mdx b/api-playground/openapi/writing-openapi.mdx
index 57cd9368..c1f987df 100644
--- a/api-playground/openapi/writing-openapi.mdx
+++ b/api-playground/openapi/writing-openapi.mdx
@@ -3,30 +3,24 @@ title: "Writing OpenAPI"
description: "Use OpenAPI features to enhance your Mintlify docs"
---
-## Describing your API
+## Getting Started with OpenAPI
-There are many great tools online for learning about and constructing OpenAPI documents. Here are our favorites:
-- [Swagger's OpenAPI Guide](https://swagger.io/docs/specification/about/) for familiarizing yourself with the OpenAPI syntax
-- [OpenAPI v3.1.0 Specification](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md) for all the details about the newest OpenAPI specification
-- [Swagger & OpenAPI Validator](https://apitools.dev/swagger-parser/online/) for debugging your OpenAPI document
-- [Swagger's Editor](https://editor.swagger.io/) for seeing examples in action
+To help you write your OpenAPI documentation, here are essential resources:
+- [Swagger's OpenAPI Guide](https://swagger.io/docs/specification/about/) - Learn OpenAPI syntax
+- [Swagger's Editor](https://editor.swagger.io/) - Try out examples
+- [Swagger & OpenAPI Validator](https://apitools.dev/swagger-parser/online/) - Debug your OpenAPI document
-
- Swagger's OpenAPI Guide is for OpenAPI v3.0, but nearly all of the information is applicable to v3.1. For more information on the differences between v3.0 and v3.1, check out [OpenAPI's blog post](https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0).
-
+## Base URL Configuration
-## Specifying the URL for your API
+Use the `servers` field to specify your API's base URL. This is required for the API Playground feature to work. Without it, the API Playground will run in simple mode only.
-In an OpenAPI document, different API endpoints are specified by their paths, like `/users/{id}`, or maybe simply `/`. To specify the base URL to which these paths should be appended, OpenAPI provides the `servers` field. This field is necessary to use some Mintlify features like the API Playground. Read how to configure the `servers` field in the [Swagger documentation](https://swagger.io/docs/specification/api-host-and-base-path/).
+## Authentication Setup
-The API Playground will use these server URLs to determine where to send requests. If multiple servers are specified, a dropdown will appear to allow toggling between servers. If no server is supplied, the API Playground will use simple mode, as there is no way to send a request.
+Most APIs require authentication. OpenAPI supports common types like:
+- Basic Authentication
+- Bearer Tokens
+- API Keys
-If different endpoints within your API exist at different URLs, you can [override the server field](https://swagger.io/docs/specification/api-host-and-base-path/#:~:text=%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20%2D%20southeastasia-,Overriding%20Servers,-The%20global%20servers) for a given path or operation.
+Define authentication methods using `securitySchemes` and apply them with the `security` field. Check [Swagger's authentication guide](https://swagger.io/docs/specification/authentication/) for detailed examples.
-## Specifying authentication
-
-Nearly all APIs require some method of authentication. OpenAPI provides the `securitySchemes` field for defining the methods of authentication used throughout your API, with simple configuration for the most common authentication types - [Basic](https://swagger.io/docs/specification/authentication/basic-authentication/), [Bearer](https://swagger.io/docs/specification/authentication/bearer-authentication/), and [API Keys](https://swagger.io/docs/specification/authentication/api-keys/). To apply these authentication methods to your endpoints, OpenAPI uses the `security` field. The syntax for defining and applying authentication is a bit unintuitive, so definitely check out [Swagger's documentation and examples](https://swagger.io/docs/specification/authentication/) on the topic.
-
-The API descriptions and API Playground will add authentication fields based on the security configurations in your OpenAPI document.
-
-If different endpoints within your API require different methods of authentication, you can [override the security field](https://swagger.io/docs/specification/authentication/#:~:text=you%20can%20apply%20them%20to%20the%20whole%20API%20or%20individual%20operations%20by%20adding%20the%20security%20section%20on%20the%20root%20level%20or%20operation%20level%2C%20respectively.) for a given operation.
+The API Playground will automatically include authentication fields based on your security configurations.
\ No newline at end of file
diff --git a/code.mdx b/code.mdx
index b137fcce..d12ba2a2 100644
--- a/code.mdx
+++ b/code.mdx
@@ -4,36 +4,20 @@ description: "Display inline code and code blocks"
icon: 'code'
---
-## Basic
+## Code Formatting
### Inline Code
-
-To denote a `word` or `phrase` as code, enclose it in backticks (`).
-
-```
-To denote a `word` or `phrase` as code, enclose it in backticks (`).
-```
+Use backticks (`) to mark `inline code` within text.
### Code Block
+For multiple lines of code, use three backticks (```) and specify the programming language for syntax highlighting:
-Use [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) by enclosing code in three backticks and follow the leading ticks with the programming language of your snippet to get syntax highlighting. Optionally, you can also write the name of your code after the programming language.
-
-```java HelloWorld.java
-class HelloWorld {
- public static void main(String[] args) {
- System.out.println("Hello, World!");
- }
-}
-```
-
-````md
-```java HelloWorld.java
+```java
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
```
-````
-Visit the [Code Block page](/content/components/code) for more detailed docs.
+For more advanced code block features, visit the [Code Block page](/content/components/code).
\ No newline at end of file
diff --git a/content/components/accordion-groups.mdx b/content/components/accordion-groups.mdx
index 29f90169..cada725a 100644
--- a/content/components/accordion-groups.mdx
+++ b/content/components/accordion-groups.mdx
@@ -17,21 +17,16 @@ Simply add `` around your existing `` components.
}
}
```
-
Check out the [Accordion](/content/components/accordions) docs for all the supported props.
-
-
- Check out the [Accordion](/content/components/accordions) docs for all the supported props.
-
-````jsx Accordion Group Example
+```jsx Accordion Group Example
You can put other components inside Accordions.
@@ -43,19 +38,14 @@ Simply add `` around your existing `` components.
}
}
```
-
Check out the [Accordion](/content/components/accordions) docs for all the supported props.
-
-
- Check out the [Accordion](/content/components/accordions) docs for all the supported props.
-
-````
+```
-`AccordionGroup` does not have any props.
+`AccordionGroup` does not have any props.
\ No newline at end of file
diff --git a/content/components/mermaid-diagrams.mdx b/content/components/mermaid-diagrams.mdx
index 1334bde5..98a036d7 100644
--- a/content/components/mermaid-diagrams.mdx
+++ b/content/components/mermaid-diagrams.mdx
@@ -4,33 +4,10 @@ description: 'Display diagrams using Mermaid'
icon: 'diagram-project'
---
-
-
-````md Mermaid Flowchart Example
-```mermaid
- flowchart LR
- subgraph subgraph1
- direction TB
- top1[top] --> bottom1[bottom]
- end
- subgraph subgraph2
- direction TB
- top2[top] --> bottom2[bottom]
- end
- %% ^ These subgraphs are identical, except for the links to them:
-
- %% Link *to* subgraph1: subgraph1 direction is maintained
- outside --> subgraph1
- %% Link *within* subgraph2:
- %% subgraph2 inherits the direction of the top-level graph (LR)
- outside ---> top2
-```
-````
-
-
-
[Mermaid](https://mermaid.js.org/) lets you create visual diagrams using text and code.
+Here's a simple example of a Mermaid flowchart:
+
```mermaid
flowchart LR
subgraph subgraph1
@@ -41,16 +18,13 @@ icon: 'diagram-project'
direction TB
top2[top] --> bottom2[bottom]
end
- %% ^ These subgraphs are identical, except for the links to them:
-
- %% Link *to* subgraph1: subgraph1 direction is maintained
outside --> subgraph1
- %% Link *within* subgraph2:
- %% subgraph2 inherits the direction of the top-level graph (LR)
outside ---> top2
```
-You can create the following using Mermaid diagrams:
+## Types of Diagrams
+
+You can create various types of diagrams using Mermaid:
- Flowchart
- Sequence diagram
@@ -62,12 +36,12 @@ You can create the following using Mermaid diagrams:
For a complete list of diagrams supported by Mermaid, check out their [website](https://mermaid.js.org/).
-## Syntax for Mermaid diagrams
+## Usage
-To create a flowchart, you can write the Mermaid flowchart inside a Mermaid code block.
+To create a Mermaid diagram, use the Mermaid code block syntax:
````md
```mermaid
-// Your mermaid code block here
+// Your mermaid code here
```
-````
+````
\ No newline at end of file
diff --git a/development.mdx b/development.mdx
index 15581014..7b533c77 100644
--- a/development.mdx
+++ b/development.mdx
@@ -4,99 +4,50 @@ description: 'Preview changes locally to update your docs'
---
-
-**Prerequisite**: Please install Node.js (version 19 or higher) before proceeding.
-
+**Prerequisite**: Node.js (version 19 or higher)
-**Step 1**: Install Mintlify:
-
-
-
- ```bash npm
- npm i -g mintlify
- ```
+## Quick Start
-```bash yarn
-yarn global add mintlify
+1. Install Mintlify:
+```bash
+npm i -g mintlify
```
-
-
-**Step 2**: Navigate to the docs directory (where the `mint.json` file is located) and execute the following command:
-
+2. Navigate to your docs directory and run:
```bash
mintlify dev
```
-A local preview of your documentation will be available at `http://localhost:3000`.
+Your docs will be available at `http://localhost:3000`.
-### Custom Ports
-
-By default, Mintlify uses port 3000. You can customize the port Mintlify runs on by using the `--port` flag. To run Mintlify on port 3333, for instance, use this command:
+## Common Tasks
+### Using a Different Port
```bash
mintlify dev --port 3333
```
-If you attempt to run Mintlify on a port that's already in use, it will use the next available port:
-
-```md
-Port 3000 is already in use. Trying 3001 instead.
-```
-
-## Mintlify Versions
-
-Please note that each CLI release is associated with a specific version of Mintlify. If your local website doesn't align with the production version, please update the CLI:
-
-
-
- ```bash npm
- npm i -g mintlify@latest
- ```
-
-```bash yarn
-yarn global upgrade mintlify
+### Updating Mintlify
+```bash
+npm i -g mintlify@latest
```
-
-
-## Validating Links
-
-The CLI can assist with validating reference links made in your documentation. To identify any broken links, use the following command:
-
+### Checking for Broken Links
```bash
mintlify broken-links
```
-## Deployment
-
-If the deployment is successful, you should see the following:
-
-
-
-
-
-## Code Formatting
-
-We suggest using extensions on your IDE to recognize and format MDX. If you're a VSCode user, consider the [MDX VSCode extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for syntax highlighting, and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for code formatting.
-
## Troubleshooting
-
-
- This may be due to an outdated version of node. Try the following:
- 1. Remove the currently-installed version of mintlify: `npm remove -g mintlify`
- 2. Upgrade to Node v19 or higher.
- 3. Reinstall mintlify: `npm install -g mintlify`
+
+ 1. Remove mintlify: `npm remove -g mintlify`
+ 2. Upgrade to Node v19+
+ 3. Reinstall: `npm install -g mintlify`
-
-
- Solution: Go to the root of your device and delete the \~/.mintlify folder. Afterwards, run `mintlify dev` again.
+
+ Delete ~/.mintlify folder and run `mintlify dev` again.
-
+
\ No newline at end of file
diff --git a/integrations/analytics/google-analytics.mdx b/integrations/analytics/google-analytics.mdx
index 7ebfe161..6b964832 100644
--- a/integrations/analytics/google-analytics.mdx
+++ b/integrations/analytics/google-analytics.mdx
@@ -2,28 +2,19 @@
title: "Google Analytics 4"
---
-You will need to generate a new GA4 property to use with Mintlify. The data collected will go into the same project as your other Google Analytics data.
+To use Google Analytics with Mintlify, you'll need a GA4 property. This works with both new GA4 properties and if you're migrating from Universal Analytics.
-If you are using the old version of Google Analytics, Universal Analytics, you will still be able to generate a GA4 property. GA4 data is slightly different from UA data but still gets collected in the same project.
+## Setup Steps
-## How to Connect GA4 to Mintlify
-
-### Create a Web Stream
-
-You will need to create a web stream to get the Measurement ID to put into Mintlify.
-
-Click the cog at the bottom left of the Google Analytics screen. Then click on Data Streams.
+1. Create a Web Stream in GA4
+ - Go to Settings (cog icon) → Data Streams
+ - Click "Add Stream" → Web
+ - Enter your Mintlify docs URL
+ - Copy your Measurement ID (`G-XXXXXXX`)

-Create a Web Stream and put the URL of your Mintlify docs site as the stream URL.
-
-Your Measurement ID looks like `G-XXXXXXX` and will show up under Stream Details immediately after you create the Web Stream.
-
-### Put Measurement ID in mint.json
-
-Add your Measurement ID to your `mint.json` file like so:
-
+2. Add to mint.json
```json mint.json
"analytics": {
"ga4": {
@@ -32,14 +23,10 @@ Add your Measurement ID to your `mint.json` file like so:
}
```
-### Wait
-
-Google Analytics takes two to three days to show your data.
-
-You can use the [Google Analytics Debugger](https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna?hl=en) to check analytics are enabled correctly. The extension will log to your browser's console every time GA4 makes a request.
-
-
-Preview links have analytics turned off.
-
+- Data takes 2-3 days to appear in Google Analytics
+- Use [Google Analytics Debugger](https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna?hl=en) to verify setup
+- Analytics are disabled on preview links
+
+
\ No newline at end of file
diff --git a/integrations/analytics/overview.mdx b/integrations/analytics/overview.mdx
index dff95d35..2e13e770 100644
--- a/integrations/analytics/overview.mdx
+++ b/integrations/analytics/overview.mdx
@@ -7,7 +7,6 @@ description: "Integrate with an analytics platform to track viewer events"
@@ -15,65 +14,8 @@ description: "Integrate with an analytics platform to track viewer events"
-
-
-
-
- }
->
-
-
-
-
-
-
-
-
- }
->
-
-
}
->
-
-
-
-
-
-
-
-
-
-
- }
->
+/>
}
->
-
-
-
-
-
-}
-
->
-
-
-
-
-
-
- }
->
-
-
-
- >
- }
->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
->
-
-
-
-
-
-
-
-}>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
->
-
-
-
-
-
- }
->
+/>
@@ -458,66 +75,27 @@ className="h-6 w-6"
}
/>
-
## Enabling Analytics
-Set your analytics keys in `mint.json`. You can add an unlimited number of analytics integrations for free.
+Add your analytics keys in `mint.json` to start tracking viewer events. You can integrate multiple analytics platforms at once.
-The syntax for `mint.json` is below. You only need to include entries for the platforms you want to connect.
+Example configuration:
-
-
-```json Analytics options in mint.json
-"analytics": {
- "amplitude": {
- "apiKey": "required"
- },
- "clearbit": {
- "publicApiKey": "required"
- },
- "fathom": {
- "siteId": "required"
- },
+```json mint.json
+{
+ "analytics": {
"ga4": {
- "measurementId": "required"
- },
- "gtm": {
- "tagId": "required"
+ "measurementId": "G-XXXXXXX"
},
"hotjar": {
- "hjid": "required",
- "hjsv": "required"
- },
- "koala": {
- "publicApiKey": "required"
- },
- "logrocket": {
- "appId": "required"
- },
- "mixpanel": {
- "projectToken": "required"
- },
- "pirsch": {
- "id": "required"
- },
- "plausible": {
- "domain": "required"
- },
- "posthog": {
- "apiKey": "required",
- "apiHost": "optional"
- },
-}
-```
-
-```json Google Analytics 4 Example
-"analytics": {
- "ga4": {
- "measurementId": "G-XXXXXXX"
+ "hjid": "XXXXX",
+ "hjsv": "6"
}
+ }
}
```
-
\ No newline at end of file
+Visit the individual integration pages above to learn more about each platform's specific setup requirements.
+
\ No newline at end of file
diff --git a/integrations/analytics/plausible.mdx b/integrations/analytics/plausible.mdx
index 4d478842..3f46be07 100644
--- a/integrations/analytics/plausible.mdx
+++ b/integrations/analytics/plausible.mdx
@@ -2,24 +2,11 @@
title: "Plausible"
---
-Add your site's domain to `mint.json` to send analytics to Plausible.
-
-
-
- Do not include `http://` or `https://` with your domain.
-
+Configure Plausible analytics by adding your site's domain to `mint.json`:
-```json Analytics options in mint.json
-"analytics": {
- "plausible": {
- "domain": "required"
- }
-}
-```
-
-```json Example
+```json mint.json
"analytics": {
"plausible": {
"domain": "docs.domain.com"
@@ -28,3 +15,7 @@ Add your site's domain to `mint.json` to send analytics to Plausible.
```
+
+
+Do not include `http://` or `https://` in the domain.
+
\ No newline at end of file
diff --git a/integrations/privacy/osano.mdx b/integrations/privacy/osano.mdx
index ded3d2d5..0bc1c241 100644
--- a/integrations/privacy/osano.mdx
+++ b/integrations/privacy/osano.mdx
@@ -2,7 +2,7 @@
title: "Osano"
---
-Add the following to your `mint.json` file to add the [Osano](https://www.osano.com/) cookie consent manager.
+To add the [Osano](https://www.osano.com/) cookie consent manager, add the following to your `mint.json` file:
@@ -20,8 +20,4 @@ Add the following to your `mint.json` file to add the [Osano](https://www.osano.
-The `SOURCE` can be found as the `src` value in the code snippet generated by Osano. It always starts with `https://cmp.osano.com/`.
-
-```html Code snippet from Osano
-
-```
\ No newline at end of file
+Replace `SOURCE` with your Osano script URL. You can find this URL in your Osano dashboard - it will start with `https://cmp.osano.com/`.
\ No newline at end of file
diff --git a/integrations/sdks/speakeasy.mdx b/integrations/sdks/speakeasy.mdx
index d45628be..7faed5d2 100644
--- a/integrations/sdks/speakeasy.mdx
+++ b/integrations/sdks/speakeasy.mdx
@@ -3,11 +3,13 @@ title: Speakeasy
description: Automate your SDK usage snippets in the API playground
---
-You can integrate Speakeasy-generated code snippets from your SDKs directly into your Mintlify API reference documentation. SDK usage snippets are shown in the [interactive playground](https://mintlify.com/docs/api-playground/overview) of your Mintlify-powered documentation.
+Integrate Speakeasy-generated code snippets from your SDKs directly into your Mintlify API reference documentation. These snippets appear in the [interactive playground](https://mintlify.com/docs/api-playground/overview) of your documentation.
-## Speakeasy SDK Repository Changes
+## Setup Instructions
-In your Speakeasy SDK repos, add the following to the `targets` section of your `.speakeasy/workflow.yaml` file to ensure code samples are automatically produced alongside SDK generations.
+### 1. Configure SDK Repositories
+
+Add the following to the `targets` section in your `.speakeasy/workflow.yaml` file within your SDK repositories:
```yaml .speakeasy/workflow.yaml
targets:
@@ -18,55 +20,41 @@ targets:
output: codeSamples.yaml
```
-Code samples will be generated in the form of an [OpenAPI overlay file](https://www.speakeasyapi.dev/openapi/overlays) that will be used in the Mintlify docs repository.
-
-## Mintlify Docs Repository Changes
+### 2. Set Up Mintlify Documentation Repository
-The workflow files produced will automatically bundle your source OpenAPI spec and Speakeasy code samples into a single output file, `openapi.yaml`. Mintlify will use this output file when constructing your API reference.
+You can set up your Mintlify documentation repository using either the interactive CLI or manual configuration.
-### Interactive CLI Set Up
+#### Option A: Interactive CLI Setup
-Run the following commands to set up the `.speakeasy/workflow.yaml` and `.github/workflows/sdk_generation.yaml` files through the interactive Speakeasy CLI.
+Run these commands in your terminal:
```bash
speakeasy configure sources
speakeasy configure github
```
-Set up your source spec. The source spec is the OpenAPI spec that code samples will be generated for, and it's often the same specification used to power Mintlify docs.
-
-
-
-Add the overlay created by Speakeasy to inject code snippets into your spec.
-
-
+Follow the prompts to:
+- Configure your source OpenAPI spec
+- Add the Speakeasy code snippet overlay
+- Set the output path for the final OpenAPI spec
-Provide a name and path for the OpenAPI spec. This will be the final spec used by Mintlify.
-
-
-
-Finally, Add your `SPEAKEASY_API_KEY` as a repository secret to your Minlify repo under `Settings > Secrets & Variables > Actions`. Find the Speakeasy API key in the Speakeasy dashboard under the **API Keys** tab.
-
-## Manual Set Up
-
-Alternatively, you can manually set up the following files in your Mintlify docs repo.
+#### Option B: Manual Setup
+Create the following files in your Mintlify docs repository:
```yaml .speakeasy/workflow.yaml
workflowVersion: 1.0.0
sources:
docs-source:
inputs:
- - location: {{your_api_spec}} # local or remote references supported
+ - location: {{your_api_spec}}
overlays:
- - location: https://raw.githubusercontent.com/{{your_sdk_repo_1}}/codeSamples.yaml
- - location: https://raw.githubusercontent.com/{{your_sdk_repo_2}}/codeSamples.yaml
- - location: https://raw.githubusercontent.com/{{your_sdk_repo_3}}/codeSamples.yaml
+ - location: https://raw.githubusercontent.com/{{your_sdk_repo}}/codeSamples.yaml
output: openapi.yaml
targets: {}
```
-```yaml .speakeasy/workflows/sdk_generation.yaml
+```yaml .github/workflows/sdk_generation.yaml
name: Generate
permissions:
checks: write
@@ -94,4 +82,8 @@ jobs:
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
```
-Finally, make sure you add your `SPEAKEASY_API_KEY` as a repository secret to your Minlify repo under `Settings > Secrets & Variables > Actions`. Find the Speakeasy API key in the Speakeasy dashboard under the **API Keys** tab.
+### 3. Add API Key
+
+Add your `SPEAKEASY_API_KEY` as a repository secret:
+1. Go to your repository's `Settings > Secrets & Variables > Actions`
+2. Add the key from your Speakeasy dashboard's **API Keys** tab
\ No newline at end of file
diff --git a/integrations/sdks/stainless.mdx b/integrations/sdks/stainless.mdx
index 8a21bfab..af1e48ce 100644
--- a/integrations/sdks/stainless.mdx
+++ b/integrations/sdks/stainless.mdx
@@ -3,18 +3,21 @@ title: Stainless
description: Automate your SDK example snippets in the API playground
---
-If you use Mintlify's OpenAPI support for your API reference documentation, add the following to your Stainless config:
+Follow these steps to integrate Stainless with your Mintlify documentation:
+
+1. Add this to your Stainless config:
```yaml openapi.stainless.yml
openapi:
code_samples: mintlify
```
-Configure the [OpenAPI setup](/api-playground/openapi/setup#in-the-repo) in your Mintlify docs. To integrate Stainless, modify the GitHub Action that uploads your OpenAPI spec to Stainless so that it pushes the Stainless-enhanced OpenAPI spec into your docs repo like so:
+2. Set up the [OpenAPI configuration](/api-playground/openapi/setup#in-the-repo) in your Mintlify docs.
+3. Create a GitHub Action to sync your OpenAPI spec:
```yaml
-name: Upload OpenAPI spec to Stainless and (Mintlify) docs repo
+name: Sync OpenAPI Spec
on:
push:
@@ -26,27 +29,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - name: Push spec and config to Stainless and outputs documented spec
+ - name: Upload to Stainless
uses: stainless-api/upload-openapi-spec-action@main
with:
input_path: 'path/to/my-company-openapi.json'
config_path: 'path/to/my-company.stainless.yaml'
output_path: 'path/to/my-company-openapi.documented.json'
project_name: 'my-stainless-project'
- - name: Push documented spec to docs repo
+ - name: Sync to docs repo
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'config/my-company-openapi.documented.json'
destination_repo: '{DOCS_REPO_NAME}'
- destination_folder: 'openapi-specs' # (optional) the folder in the destination repository to place the file in, if not the root directory
- user_email: '{EMAIL}' # the email associated with the GH token
- user_name: '{USERNAME}' # the username associated with the GH token
+ destination_folder: 'openapi-specs'
+ user_email: '{EMAIL}'
+ user_name: '{USERNAME}'
commit_message: 'Auto-updates from Stainless'
```
-This assumes the following secrets have been [uploaded to your GitHub Actions Secrets](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions):
-
-- `secrets.STAINLESS_API_KEY`: Your Stainless API key.
-- `secrets.API_TOKEN_GITHUB`: A GitHub [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with permissions to push to your docs repo.
+Required GitHub Secrets:
+- `STAINLESS_API_KEY`: Your Stainless API key
+- `API_TOKEN_GITHUB`: GitHub [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with repo access
\ No newline at end of file
diff --git a/migration.mdx b/migration.mdx
index 491e8945..a69e7eb1 100644
--- a/migration.mdx
+++ b/migration.mdx
@@ -4,141 +4,48 @@ description: 'How to migrate documentation from your existing provider'
icon: 'arrow-up-from-bracket'
---
-You can use our [public packages](https://www.npmjs.com/package/@mintlify/scraping) to scrape documentation frameworks to Mintlify.
+## Supported Providers
-We currently support migration for:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+We provide tools to help you migrate your documentation from popular providers:
-
-
-
-
-
-
-
-
-} />
-
-
-} />
-
-
-} />
+
+
+
+
-Don't see your docs provider or have a home grown system? We can still help! Please get in touch at sales@mintlify.com.
-
-## Commands
-
-- `mintlify-scrape section [url]` - Scrapes multiple pages in a site.
-- `mintlify-scrape page [url]` - Scrapes a single page in a site.
+Don't see your provider? Contact us at sales@mintlify.com for custom migration support.
+## Quick Start
-The commands will automatically detect the framework.
+Install our migration tool:
-## 🚀 Installation
-
-First, install the package:
-
-```
-npm i @mintlify/scraping
+```bash
+npm install @mintlify/scraping
```
-One-time use:
-
-```bash Section
-npx @mintlify/scraping@latest section [url]
-```
-
-```bash Page
-npx @mintlify/scraping@latest page [url]
-```
-
-
-Global installation:
-
-```
-npm install @mintlify/scraping@latest -g
-```
-
-Global usage:
+Then run one of these commands:
-```bash Section
+```bash Multiple Pages
mintlify-scrape section [url]
```
-```bash Page
+```bash Single Page
mintlify-scrape page [url]
```
-Provide the relative path or URL to the OpenAPI file to generate frontmatter files for each endpoint.
+The tool will automatically detect your documentation framework and handle the migration.
+
+## OpenAPI Migration
+To migrate OpenAPI documentation:
+```bash
+mintlify-scrape openapi-file [filename]
```
-mintlify-scrape openapi-file [openApiFilename]
--w, --writeFiles Whether or not to write the frontmatter files [boolean] [default: true]
--o, --outDir The folder in which to write any created frontmatter files [string]
-```
\ No newline at end of file
+Options:
+- `-w, --writeFiles`: Write the frontmatter files (default: true)
+- `-o, --outDir`: Output directory for generated files
\ No newline at end of file
diff --git a/mint.json b/mint.json
index 0636b031..b6e13a7d 100644
--- a/mint.json
+++ b/mint.json
@@ -122,7 +122,8 @@
},
{
"group": "Advanced",
- "pages": [{
+ "pages": [
+ {
"icon": "code",
"group": "Custom Scripts",
"pages": [
@@ -196,7 +197,10 @@
},
{
"group": "SDKs",
- "pages": ["integrations/sdks/speakeasy", "integrations/sdks/stainless"]
+ "pages": [
+ "integrations/sdks/speakeasy",
+ "integrations/sdks/stainless"
+ ]
},
{
"group": "Support",
@@ -208,7 +212,10 @@
},
{
"group": "Privacy",
- "pages": ["integrations/privacy/overview", "integrations/privacy/osano"]
+ "pages": [
+ "integrations/privacy/overview",
+ "integrations/privacy/osano"
+ ]
},
{
"group": "Components",
@@ -240,7 +247,9 @@
},
{
"group": "Changelog",
- "pages": ["changelog/overview"]
+ "pages": [
+ "changelog/overview"
+ ]
}
],
"footer": {
@@ -324,4 +333,4 @@
"publicApiKey": "pk_76a6caa274e800f3ceff0b2bc6b9b9d82ab8"
}
}
-}
+}
\ No newline at end of file
diff --git a/quickstart.mdx b/quickstart.mdx
index fc6eb786..8d287a4c 100644
--- a/quickstart.mdx
+++ b/quickstart.mdx
@@ -4,178 +4,62 @@ description: "Start building modern documentation in under five minutes"
icon: "rocket"
---
-
-
-
-
-
## Getting Started
-Welcome! Follow the instructions below to learn how to deploy, update and
-supercharge your documentation with Mintlify.
-
-### Creating the Repository
-
-Mintlify docs are rendered from MDX files and configurations defined in our
-[starter kit](https://github.com/mintlify/starter). We use GitHub to integrate
-your docs with your code, and make source control effortless.
-
-
-
-
- If you've created a docs repo in our onboarding, this step is complete. You can find your docs repository on your Mintlify [dashboard](https://dashboard.mintlify.com).
-
- To create your docs repo without logging into GitHub, follow these instructions:
- 1. Clone our [starter template](https://github.com/mintlify/starter) into a new public repo. You can make the repo private later.
- 2. [Get in touch](mailto:support@mintlify.com) with our team to deploy your repo.
-
-
- 
-
-
-
-
-
-
- The next step is to install our GitHub app. This ensures that your updates are automatically deployed when you push changes. You can find the installation link in the [dashboard](https://dashboard.mintlify.com/settings), on the Settings page. Upon successful installation, a check mark will appear next to the commit hash of the repository.
-
-
- 
-
-
-
-
-
-
-### Updating the Content
-
-Mintlify enables you to easily customize the style, structure, and content of
-your docs.
-
-
-
-
- 1. Install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
- 2. Once git is installed, clone your docs repository using `git clone `. If you haven't set it up yet, now would be a good time to do so with these [SSH keys](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent).
- 3. Use your favorite IDE to open the repository.
- 4. Install our Mintlify CLI to preview changes with `npm i -g mintlify`.
-
- Learn more about this in our [local development guide](/development).
-
-
-
-
-
- Learn more about how to use the web editor on our [guide](/web-editor).
-
-
+Welcome to Mintlify! This guide will help you set up your documentation in just a few steps.
-
-
- Easily customize colors, logos and buttons among other configurations in our `mint.json` file. Start with these basic configurations:
+### 1. Create Your Documentation Repository
- ```json
- "name": "Your Company"
- "logo": {
- "light": "/logo/light.svg",
- "dark": "/logo/dark.svg",
- "href": "https://yourcompany.com"
- },
- "favicon": "/favicon.svg",
- "colors": {
- "primary": "#2AB673",
- "light": "#55D799",
- "dark": "#117866",
- },
- ```
+1. Clone our [starter template](https://github.com/mintlify/starter) into a new repository
+2. Install our GitHub app from your [dashboard settings](https://dashboard.mintlify.com/settings) to enable automatic deployments
- A full list of supported configurations can be found at [global settings](/settings/global).
+### 2. Update Your Content
-
+Choose your preferred editing method:
-
+#### Development Environment (Recommended)
+1. Clone your repository: `git clone `
+2. Install Mintlify CLI: `npm i -g mintlify`
+3. Start local development server: `mintlify dev`
- Add content with simple MDX files. Initiate your pages with this template:
+#### Web Editor
+Edit directly through our web interface at [dashboard.mintlify.com](https://dashboard.mintlify.com)
- ```md
- ---
- title: "Page Title"
- sidebarTitle: "Sidebar title (optional - if different from page title)"
- description: "Subtitle (optional)"
- ---
- ```
+### 3. Customize Your Docs
- Learn more about adding images, tables, lists, and more using the [MDX syntax](/text). We also offer a [wide array of components](/content/components).
+Update your `mint.json` with your brand details:
+```json
+{
+ "name": "Your Company",
+ "logo": {
+ "light": "/logo/light.svg",
+ "dark": "/logo/dark.svg"
+ },
+ "colors": {
+ "primary": "#2AB673"
+ }
+}
+```
-
+### 4. Add Content
-
-
- Once ready, commit and push your changes to update your docs site. Here is a [guide](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository#about-git-push) on how to do that. If the GitHub app is unable to successfully deploy your changes, you can manually update your docs through our [dashboard](https://dashboard.mintlify.com).
-
-
- 
-
-
-
-
-
-
- You can easily set up your API references using an OpenAPI document.
-
- 1. Add your `openapi.yaml` or `openapi.json` file into your docs repository or define the `openapi` field in `mint.json` with a URL.
-
- ```json
- "openapi": "link-to-your-openapi-file"
- ```
-
- 2. Use our [scraper](/api-playground/openapi/setup#autogenerate-files-recommended) to autogenerate your OpenAPI endpoints files as:
-
- ```bash
- npx @mintlify/scraping@latest openapi-file
- ```
-
- 3. Finally, include the generated endpoint MDX files to your `mint.json` under `navigation`.
-
- For a complete guide on using Mintlify with OpenAPI, check out [this guide](/api-playground/openapi/setup). [This guide](/api-playground/openapi/writing-openapi) explains how to configure your API authentication methods. For manual API references definition, explore [our syntax](/api-playground/overview).
+Create new pages using MDX files with this header:
+```md
+---
+title: "Page Title"
+description: "Page description"
+---
+```
-
+### 5. Deploy Your Changes
-
+Commit and push your changes to automatically update your documentation site.
- Our in-house analytics give you insights into page views, search analytics, session recordings and more. Access these on your [dashboard](https://dashboard.mintlify.com/analytics).
-
- We also support integrations with a range of analytics providers. You can find the list of providers [here](/integrations/analytics/overview).
+### Need Help?
-
-
+- Join our [community](https://mintlify.com/community)
+- Email us at [support@mintlify.com](mailto:support@mintlify.com)
- We provide a white-glove migration service as part of our Enterprise plan.
- Interested? You can request it by [contacting us](mailto:sales@mintlify.com).
-
-
-### Publishing
-
-
-
- Integrate your docs into your website by hosting them on a custom domain. This is included even in the free plan.
-
- Navigate to your [dashboard settings](https://www.dashboard.mintlify.com/settings) to add a custom domain.
-
-
- 
-
-
-
-
-Congrats! You've set up your Mintlify Docs and it's looking amazing! Need
-support or want to give some feedback? You can join our
-[community](https://mintlify.com/community) or drop us an email at
-[support@mintlify.com](mailto:support@mintlify.com).
+ Want help migrating your existing docs? Contact [sales@mintlify.com](mailto:sales@mintlify.com) about our Enterprise plan's white-glove migration service.
+
\ No newline at end of file
diff --git a/reusable-snippets.mdx b/reusable-snippets.mdx
index 7aacc900..70801fce 100644
--- a/reusable-snippets.mdx
+++ b/reusable-snippets.mdx
@@ -4,132 +4,64 @@ description: 'Reusable, custom snippets to keep content in sync'
icon: 'recycle'
---
-One of the core principles of software development is DRY (Don't Repeat
-Yourself). This is a principle that applies to documentation as
-well. If you find yourself repeating the same content in multiple places, you
-should consider creating a custom snippet to keep your content in sync.
+Reusable snippets help you avoid repeating content across your documentation. When you need to use the same content in multiple places, create a custom snippet to keep everything in sync.
-## Creating a custom snippet
+## Creating a Snippet
-**Pre-condition**: You must create your snippet file in the `snippets` directory.
+All snippets must be created in the `snippets` directory.
- Any page in the `snippets` directory will be treated as a snippet and will not
- be rendered into a standalone page. If you want to create a standalone page
- from the snippet, import the snippet into another file and call it as a
- component.
+ Files in the `snippets` directory won't be rendered as standalone pages. To use a snippet, import it into another page and use it as a component.
-### Default export
+### Basic Usage
-1. Add content to your snippet file that you want to re-use across multiple
- locations. Optionally, you can add variables that can be filled in via props
- when you import the snippet.
+1. Create your snippet file in the `snippets` directory:
```typescript snippets/my-snippet.mdx
-Hello world! This is my content I want to reuse across pages. My keyword of the
-day is {word}.
+Hello world! This is my reusable content. My keyword is {word}.
```
-
- The content that you want to reuse must be inside the `snippets` directory in
- order for the import to work.
-
-
-2. Import the snippet into your destination file.
+2. Import and use the snippet:
```typescript destination-file.mdx
----
-title: My title
-description: My Description
----
-
-import MySnippet from '/snippets/path/to/my-snippet.mdx';
+import MySnippet from '/snippets/my-snippet.mdx';
-## Header
-
-Lorem impsum dolor sit amet.
-
-
+
```
-### Reusable variables
-
-1. Export a variable from your snippet file:
-
-```typescript snippets/path/to/custom-variables.mdx
-export const myName = 'my name';
-
-export const myObject = { fruit: 'strawberries' };
-```
-
-2. Import the snippet from your destination file and use the variable:
-
-```typescript destination-file.mdx
----
-title: My title
-description: My Description
----
+### Advanced Features
-import { myName, myObject } from '/snippets/path/to/custom-variables.mdx';
+You can also create:
-Hello, my name is {myName} and I like {myObject.fruit}.
+1. **Reusable Variables**:
+```typescript snippets/variables.mdx
+export const myName = 'John';
```
-### Reusable components
-
-1. Inside your snippet file, create a component that takes in props by exporting
- your component in the form of an arrow function.
-
-```typescript snippets/custom-component.mdx
+2. **Custom Components**:
+```typescript snippets/component.mdx
export const MyComponent = ({ title }) => (
{title}
-
... snippet content ...
+
Content goes here
);
```
-
- MDX does not compile inside the body of an arrow function. Stick to HTML
- syntax when you can or use a default export if you need to use MDX.
-
-
-2. Import the snippet into your destination file and pass in the props
-
-```typescript destination-file.mdx
----
-title: My title
-description: My Description
----
-
-import { MyComponent } from '/snippets/custom-component.mdx';
-
-Lorem ipsum dolor sit amet.
-
-
-```
+
+ When creating components, use HTML syntax instead of MDX inside arrow functions.
+
### Client-Side Content
-By default, Mintlify employs server-side rendering, generating content
-at build time. For client-side content loading, ensure to verify the
-`document` object's availability before initiating the rendering process.
+For client-side rendering, always check if the `document` object exists:
```typescript snippets/client-component.mdx
-{/* `setTimeout` simulates a React.useEffect, which is called after the component is mounted. */}
export const ClientComponent = () => {
- if (typeof document === "undefined") {
- return null;
- } else {
- setTimeout(() => {
- const clientComponent = document.getElementById("client-component");
- if (clientComponent) {
- clientComponent.innerHTML = "Hello, client-side component!";
- }
- }, 1);
-
- return
- }
+ if (typeof document === "undefined") return null;
+
+ // Your client-side code here
+ return ;
}
-```
+```
\ No newline at end of file
diff --git a/settings/gitlab.mdx b/settings/gitlab.mdx
index 576ba17f..71600a30 100644
--- a/settings/gitlab.mdx
+++ b/settings/gitlab.mdx
@@ -9,90 +9,50 @@ icon: "gitlab"
plan](https://mintlify.com/pricing).
-We use a combination of Access tokens and Webhooks to authenticate and sync
-changes between GitLab and Mintlify.
+Mintlify uses Access tokens for authentication and Webhooks for syncing changes between GitLab and Mintlify. This enables features like automatic preview deployments for Merge Requests.
-- We use Access tokens to pull information from GitLab.
-- We use Webhooks so GitLab can notify Mintlify when changes are made.
- - This allows Mintlify to create preview deployments when a MR is created.
-
-## Set up the connection
+## Set up GitLab Integration
-
- Within your GitLab project, navigate to `Settings` > `General` and find the `Project ID`.
+
+ Go to `Settings` > `General` and copy your `Project ID`.
-
- a. Navigate to `Settings` > `Access Tokens`.
-
- b. Select `Add new token`.
- 1. Name the token "Mintlify".
- 2. If you have a private repo, you must set the role as `Maintainer`.
- 3. Choose `api` and `read_api` for the scopes.
-
- c. Finally click `Create project access token` and copy the token.
-
+
+ 1. Go to `Settings` > `Access Tokens`
+ 2. Click `Add new token`
+ 3. Set name as "Mintlify"
+ 4. For private repos: Set role as `Maintainer`
+ 5. Select `api` and `read_api` scopes
+ 6. Click `Create project access token` and copy it
-
-
- Within the [Mintlify dashboard](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/git-settings), add the project ID and access token from the previous steps alongside the other configurations. Click "Save Changes" when you're done.
+
+ Add your project ID and access token in the [Mintlify dashboard](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/git-settings) and save changes.
-
-
-## Create the webhook
-
-Webhooks allow us to receive events when changes are made so that we can
-automatically trigger deployments.
-
-
-
-
-
-
-
-
- In the "URL" field, enter the endpoint `https://leaves.mintlify.com/gitlab-webhook` and name the webhook "Mintlify".
-
-
-
- Paste the Webhook token generated after setting up the connection.
-
-
-
-
-
- Select the events you want to trigger the webhook:
- - Push events (All branches)
- - Merge requests events
-
- When you're done it should look like this:
-
-
-
-
-
- After creating the Webhook, click the "Test" dropdown and select "Push events" to send a sample payload to ensure it's configured correctly. It'll say "Hook executed successfully: HTTP 200" if configured correctly.
-
- This will help you verify that everything is working correctly and that your documentation will sync properly with your GitLab repository.
+
+ 1. Go to `Settings` > `Webhooks`
+ 2. Add new webhook with URL: `https://leaves.mintlify.com/gitlab-webhook`
+ 3. Paste the webhook token from Mintlify dashboard
+ 4. Enable:
+ - Push events (All branches)
+ - Merge requests events
+ 5. Test the webhook with "Push events"
-
- Reach out to the Mintlify team if you need help. Contact us
- [here](https://mintlify.com/enterprise).
+ Need help? Contact us [here](https://mintlify.com/enterprise).
-[git-settings]: https://dashboard.mintlify.com/settings/deployment/git-settings
+[git-settings]: https://dashboard.mintlify.com/settings/deployment/git-settings
\ No newline at end of file