diff --git a/advanced/rest-api/overview.mdx b/advanced/rest-api/overview.mdx
index 49b281047..96052f9fc 100644
--- a/advanced/rest-api/overview.mdx
+++ b/advanced/rest-api/overview.mdx
@@ -6,17 +6,13 @@ title: Introduction
The Mintlify REST API is only available on the startup plan and above.
-Leverage the external API to programmatically trigger an update when desired.
-The primary use-case will be to trigger updates. We will be adding more and more
-functionality to the API overtime. Let us know what else you want to see in
-[our community](https://mintlify.com/community)!
+The Mintlify REST API allows you to programmatically trigger documentation updates. For feature requests, join us in [our community](https://mintlify.com/community).
## Authentication
-You can generate an API key through
-[the dashboard](https://dashboard.mintlify.com/settings/integrations). The API key is
-associated with the entire org and can be used across multiple deployments.
+Generate your API key in [the dashboard](https://dashboard.mintlify.com/settings/integrations). Each API key works for all deployments within your organization.
+
\ No newline at end of file
diff --git a/advanced/subpath/cloudflare.mdx b/advanced/subpath/cloudflare.mdx
index 763b44eda..3b0c1809f 100644
--- a/advanced/subpath/cloudflare.mdx
+++ b/advanced/subpath/cloudflare.mdx
@@ -7,22 +7,20 @@ import SubpathGatingSnippet from "/snippets/custom-subpath-gating.mdx";
-## Create Cloudflare Worker
+## Setup Guide
-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 Worker
+ - Go to `Workers & Pages > Create application > Create worker`
+ - Create a new Cloudflare worker
-### 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.
+2. Configure Domain
+ - In your worker, go to `Settings > Triggers`
+ - Click `Add Custom Domain`
+ - Add your domain (both with and without `www.`)
-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 Worker Script
+ - Click `Edit Code`
+ - Copy and paste the script below
+ - Replace `[SUBDOMAIN]` and `[YOUR_DOMAIN]` with your values
+ - Click `Deploy`
```javascript
addEventListener("fetch", (event) => {
@@ -80,5 +67,4 @@ async function handleRequest(request) {
}
```
-Click on `Deploy` and wait for the changes to propagate (it can take up to a few
-hours).
+Note: 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/subpath/vercel.mdx b/advanced/subpath/vercel.mdx
index 925561f9f..eed73aa41 100644
--- a/advanced/subpath/vercel.mdx
+++ b/advanced/subpath/vercel.mdx
@@ -3,14 +3,7 @@ title: "Vercel"
description: "Host documentation at a /docs subpath using Vercel"
---
-import SubpathGatingSnippet from "/snippets/custom-subpath-gating.mdx";
-
-
-
-## vercel.json Configuration
-
-To host your documentation at a custom subpath using Vercel, you need to add the
-following configuration to your `vercel.json` file.
+To host your documentation at a custom subpath using Vercel, add the following configuration to your `vercel.json` file:
```json
{
@@ -28,7 +21,5 @@ following configuration to your `vercel.json` file.
```
- For more information, you can also refer to Vercel's offical guide on
- rewrites: [Project Configuration:
- Rewrites](https://vercel.com/docs/projects/project-configuration#rewrites)
-
+ For more information, see [Vercel's rewrites documentation](https://vercel.com/docs/projects/project-configuration#rewrites)
+
\ No newline at end of file
diff --git a/advanced/widget/chat.mdx b/advanced/widget/chat.mdx
index 216179a7a..844399bc9 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 chat widget into your products to provide AI-powered documentation search for your users.

## 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 the following 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/Next.js Installation
+
+Install and use the `@mintlify/widget-react` component:
```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
-| 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 the following main properties:
-### MintlifyWidgetTrackingFunctions
+| Prop | Description |
+|------|-------------|
+| `connection.apiKey` | Required. Your widget API key |
+| `display.trigger.type` | Optional. Either 'button' or 'input' |
+| `display.trigger.label` | Optional. Custom trigger text |
+| `display.colors.primary` | Optional. Custom primary color |
+| `display.chat.exampleQueries` | Optional. Array of example questions |
-| 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 advanced configuration options, visit our [detailed configuration guide]()
+
\ No newline at end of file
diff --git a/api-playground/openapi/setup.mdx b/api-playground/openapi/setup.mdx
index 7d45da4f6..88dfef742 100644
--- a/api-playground/openapi/setup.mdx
+++ b/api-playground/openapi/setup.mdx
@@ -3,147 +3,57 @@ 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+.
+Ensure you have a valid OpenAPI document (v3.0+) in JSON or YAML format that follows the [OpenAPI specification](https://swagger.io/specification/).
-## Auto-populate API pages
+## Configure Your API Pages
-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 add OpenAPI documentation:
-**Example with Anchors:**
+### 1. Auto-populate (Recommended)
-```json {5}
+Add an `openapi` field to your `mint.json` 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:
-
-* `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.
+For more customization, create individual MDX pages for each API endpoint:
+1. **Auto-generate pages** (recommended for large APIs):
```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.
-
-
-
-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
- ---
- ```
-
-
-
+2. **Manual creation**:
+```md
+---
+title: "Get users"
+openapi: "/path/to/openapi.json 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.
+ The method and path must exactly match your OpenAPI document specification.
-## 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:
+## OpenAPI Schemas
-
- ```md Example
- ---
- openapi-schema: OrderItem
- ---
- ```
+To create pages for OpenAPI schemas:
- ```md Format
- ---
- openapi-schema: "schema-key"
- ---
- ```
-
\ No newline at end of file
+```md
+---
+openapi-schema: "schema-name"
+---
+```
\ No newline at end of file
diff --git a/api-playground/openapi/writing-openapi.mdx b/api-playground/openapi/writing-openapi.mdx
index 57cd93680..9d893de43 100644
--- a/api-playground/openapi/writing-openapi.mdx
+++ b/api-playground/openapi/writing-openapi.mdx
@@ -3,30 +3,22 @@ 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 write effective OpenAPI documentation, you can use these helpful 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).
-
+## Key Components
-## Specifying the URL for your API
+### Base URL Configuration
+Use the `servers` field to specify your API's base URL. This is required for the API Playground to work properly. Multiple servers can be specified to allow switching between environments.
-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
+Define your API's authentication methods using the `securitySchemes` field. Common types include:
+- Basic Authentication
+- Bearer Authentication
+- API Keys
-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.
-
-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.
-
-## 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.
+Apply authentication to your endpoints using the `security` field. Find detailed examples in [Swagger's authentication guide](https://swagger.io/docs/specification/authentication/).
\ No newline at end of file
diff --git a/code.mdx b/code.mdx
index b137fcce0..a5d443673 100644
--- a/code.mdx
+++ b/code.mdx
@@ -4,36 +4,20 @@ description: "Display inline code and code blocks"
icon: 'code'
---
-## Basic
+## Using Code
### 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`.
### Code Block
+Create code blocks using three backticks with an optional language name 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 advanced features, see 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 29f90169c..280af2126 100644
--- a/content/components/accordion-groups.mdx
+++ b/content/components/accordion-groups.mdx
@@ -4,58 +4,32 @@ description: "Group multiple accordions into a single display."
icon: "table-rows"
---
-Simply add `` around your existing `` components.
+Simply wrap multiple `` components with `` to group them together.
-
- You can put other components inside Accordions.
-
- ```java HelloWorld.java
- class HelloWorld {
- public static void main(String[] args) {
- System.out.println("Hello, World!");
- }
- }
- ```
-
+
+ You can put any content inside Accordions.
-
- 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.
-
- ```java HelloWorld.java
- class HelloWorld {
- public static void main(String[] args) {
- System.out.println("Hello, World!");
- }
- }
- ```
-
-
-
-
- Check out the [Accordion](/content/components/accordions) docs for all the supported props.
+
+ You can put any content inside Accordions.
-
+
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/development.mdx b/development.mdx
index 15581014c..812d63091 100644
--- a/development.mdx
+++ b/development.mdx
@@ -4,99 +4,66 @@ 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:
+## Quick Start
+1. Install Mintlify CLI:
-
- ```bash npm
- npm i -g mintlify
- ```
+```bash npm
+npm i -g mintlify
+```
```bash yarn
yarn global add mintlify
```
-
-**Step 2**: Navigate to the docs directory (where the `mint.json` file is located) and execute the following command:
-
+2. Start the development server:
```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
+mintlify dev --port
```
-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:
-
+### Updating Mintlify
-
- ```bash npm
- npm i -g mintlify@latest
- ```
+```bash npm
+npm i -g mintlify@latest
+```
```bash yarn
yarn global upgrade mintlify
```
-
-## 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.
+## Recommended Tools
+- [MDX VSCode extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) - For syntax highlighting
+- [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 the ~/.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 7ebfe1610..92ce593ec 100644
--- a/integrations/analytics/google-analytics.mdx
+++ b/integrations/analytics/google-analytics.mdx
@@ -2,28 +2,21 @@
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.
+Connect your Mintlify documentation to GA4 to track visitor 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
+1. Create a GA4 property if you haven't already (works alongside existing Universal Analytics properties)
-### 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.
+2. Create a Web Stream
+ - 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:
-
+3. Add to mint.json:
```json mint.json
"analytics": {
"ga4": {
@@ -32,14 +25,8 @@ 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.
+## Verification
-
+- 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
diff --git a/integrations/analytics/overview.mdx b/integrations/analytics/overview.mdx
index dff95d35a..349b4486a 100644
--- a/integrations/analytics/overview.mdx
+++ b/integrations/analytics/overview.mdx
@@ -3,6 +3,12 @@ title: "Analytics Integrations"
description: "Integrate with an analytics platform to track viewer events"
---
+# Analytics Integrations
+
+Mintlify supports integration with popular analytics platforms to help you track and understand how users interact with your documentation.
+
+## Available Platforms
+
-
+
}>
-
-
-
-
-
-
-
- }
->
+
-
-
-
-
-
-
-
- }
->
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
- }
->
-
-
-
-
-
-
-
-
-
-
- }
->
-
-
-
-
-
- }
->
-
-
-
-
-
-}
-
->
+
+ }
+ />
-
-
-
-
-
- }
->
+
+
+
+
+
+ }
+ />
-
-
- >
- }
->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
->
-
-
-
-
-
-
-
-}>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
->
-
-
-
-
-
- }
->
-
-
-
-
-
-
-
-
- }
-/>
-
-## Enabling Analytics
-
-Set your analytics keys in `mint.json`. You can add an unlimited number of analytics integrations for free.
+## Setup Guide
-The syntax for `mint.json` is below. You only need to include entries for the platforms you want to connect.
+Enable analytics by adding your platform's credentials to `mint.json`. You can add multiple analytics platforms:
-
-
-```json Analytics options in mint.json
-"analytics": {
- "amplitude": {
- "apiKey": "required"
- },
- "clearbit": {
- "publicApiKey": "required"
- },
- "fathom": {
- "siteId": "required"
- },
+```json
+{
+ "analytics": {
"ga4": {
- "measurementId": "required"
- },
- "gtm": {
- "tagId": "required"
- },
- "hotjar": {
- "hjid": "required",
- "hjsv": "required"
- },
- "koala": {
- "publicApiKey": "required"
- },
- "logrocket": {
- "appId": "required"
+ "measurementId": "G-XXXXXXX"
},
"mixpanel": {
- "projectToken": "required"
- },
- "pirsch": {
- "id": "required"
- },
- "plausible": {
- "domain": "required"
- },
- "posthog": {
- "apiKey": "required",
- "apiHost": "optional"
- },
-}
-```
-
-```json Google Analytics 4 Example
-"analytics": {
- "ga4": {
- "measurementId": "G-XXXXXXX"
+ "projectToken": "XXXXXXX"
}
+ }
}
```
-
\ No newline at end of file
+See each platform's dedicated page for specific configuration details.
\ No newline at end of file
diff --git a/integrations/privacy/osano.mdx b/integrations/privacy/osano.mdx
index ded3d2d59..606273440 100644
--- a/integrations/privacy/osano.mdx
+++ b/integrations/privacy/osano.mdx
@@ -2,26 +2,16 @@
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, include your Osano source URL in `mint.json`:
-```json Integration options in mint.json
+```json mint.json
"integrations": {
- "osano": "SOURCE"
-}
-```
-
-```json Example
-"integrations": {
- "osano": "https://cmp.osano.com/2sUB2dqwqdkks/8dqwd-dwd86£-4a9b/osano.js"
+ "osano": "https://cmp.osano.com/YOUR_SOURCE_URL/osano.js"
}
```
-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
+You can find your source URL in the Osano dashboard under the installation code's `src` attribute.
\ No newline at end of file
diff --git a/integrations/sdks/speakeasy.mdx b/integrations/sdks/speakeasy.mdx
index d45628bed..dde71537c 100644
--- a/integrations/sdks/speakeasy.mdx
+++ b/integrations/sdks/speakeasy.mdx
@@ -3,70 +3,52 @@ 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.
+Speakeasy allows you to integrate SDK code snippets directly into your Mintlify API reference documentation. These snippets appear in the [interactive playground](https://mintlify.com/docs/api-playground/overview).
-## Speakeasy SDK Repository Changes
+## Setup Steps
-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 your Speakeasy SDK repositories:
+ ```yaml .speakeasy/workflow.yaml
+ targets:
+ my-target:
+ target: typescript
+ source: my-source
+ codeSamples:
+ output: codeSamples.yaml
+ ```
-```yaml .speakeasy/workflow.yaml
-targets:
- my-target:
- target: typescript
- source: my-source
- codeSamples:
- 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 your Mintlify docs repository using one of these methods:
-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.
-
-### Interactive CLI Set Up
-
-Run the following commands to set up the `.speakeasy/workflow.yaml` and `.github/workflows/sdk_generation.yaml` files through the interactive Speakeasy CLI.
+### Option 1: Interactive Setup (Recommended)
+Run these commands:
```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.
-
-
-
-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
+Follow the prompts to:
+- Set up your source OpenAPI spec
+- Add the code snippet overlay
+- Configure the output spec path
-Alternatively, you can manually set up the following files in your Mintlify docs repo.
+### Option 2: Manual Setup
+Create two files in your 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 +76,4 @@ 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 your `SPEAKEASY_API_KEY` as a repository secret under `Settings > Secrets & Variables > Actions`. You can find the key in the Speakeasy dashboard under the **API Keys** tab.
\ No newline at end of file
diff --git a/integrations/sdks/stainless.mdx b/integrations/sdks/stainless.mdx
index 8a21bfab4..49abf8e43 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:
+To integrate Stainless with your Mintlify API documentation:
+
+1. Add the following 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. Configure the [OpenAPI setup](/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,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - name: Push spec and config to Stainless and outputs documented spec
- uses: stainless-api/upload-openapi-spec-action@main
+ - 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
- uses: dmnemec/copy_file_to_another_repo_action@main
+ - 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 491e89454..8d1761c00 100644
--- a/migration.mdx
+++ b/migration.mdx
@@ -4,141 +4,46 @@ 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:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-} />
-
-
-} />
-
-
-} />
+
+
+
-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 docs provider? Contact us at sales@mintlify.com for custom migration support.
+## Quick Start
-The commands will automatically detect the framework.
+Install the migration tool:
-## 🚀 Installation
-
-First, install the package:
-
-```
+```bash
npm i @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 the following commands:
-```bash Section
-mintlify-scrape section [url]
+```bash Multiple Pages
+npx @mintlify/scraping section [url]
```
-```bash Page
-mintlify-scrape page [url]
+```bash Single Page
+npx @mintlify/scraping page [url]
```
-Provide the relative path or URL to the OpenAPI file to generate frontmatter files for each endpoint.
+The tool will automatically detect the framework and handle the migration process.
+
+## OpenAPI Migration
+To migrate OpenAPI documentation:
+```bash
+npx @mintlify/scraping 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 created files
\ No newline at end of file
diff --git a/quickstart.mdx b/quickstart.mdx
index fc6eb786c..4b31bea7f 100644
--- a/quickstart.mdx
+++ b/quickstart.mdx
@@ -4,178 +4,58 @@ 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).
-
-
-
-
-
- Easily customize colors, logos and buttons among other configurations in our `mint.json` file. Start with these basic configurations:
+Follow these steps to set up your documentation with Mintlify:
- ```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. Create Your Documentation Repository
- A full list of supported configurations can be found at [global settings](/settings/global).
+1. Use our [starter template](https://github.com/mintlify/starter) to create a new repository
+2. Install our GitHub app from your [dashboard settings](https://dashboard.mintlify.com/settings) for automatic deployments
-
+### 2. Update Your Content
-
+Choose your preferred editing method:
- Add content with simple MDX files. Initiate your pages with this template:
+#### Local Development (Recommended)
+1. Clone your repository: `git clone `
+2. Install Mintlify CLI: `npm i -g mintlify`
+3. Start editing in your IDE
+4. Preview changes locally with `mintlify dev`
- ```md
- ---
- title: "Page Title"
- sidebarTitle: "Sidebar title (optional - if different from page title)"
- description: "Subtitle (optional)"
- ---
- ```
+#### Web Editor
+Use our web editor for quick updates - learn more in our [web editor guide](/web-editor).
- Learn more about adding images, tables, lists, and more using the [MDX syntax](/text). We also offer a [wide array of components](/content/components).
+### 3. Customize Your Docs
-
+Update `mint.json` with your brand settings:
+```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).
-
-
-
-
-
- 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).
-
-
-
-
-
- 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.
+Create new pages using MDX:
+```md
+---
+title: "Page Title"
+description: "Page description"
+---
+```
-
- 
-
+### 5. Deploy
-
+1. Commit and push your changes
+2. Your site will automatically update
+3. Add a custom domain through your [dashboard settings](https://dashboard.mintlify.com/settings)
-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).
+Need help? Join our [community](https://mintlify.com/community) or email us at [support@mintlify.com](mailto:support@mintlify.com).
\ No newline at end of file
diff --git a/settings/authentication-personalization/authentication-setup/jwt.mdx b/settings/authentication-personalization/authentication-setup/jwt.mdx
index 16d6f59eb..6359871a2 100644
--- a/settings/authentication-personalization/authentication-setup/jwt.mdx
+++ b/settings/authentication-personalization/authentication-setup/jwt.mdx
@@ -4,58 +4,41 @@ description: 'Use a customized login flow to authenticate users'
---
- This is the documentation for the JWT **Authentication** Handshake. The steps for setting up the [JWT **Personalization** Handshake](/settings/authentication-personalization/personalization-setup/jwt) are slightly different.
+ This is the documentation for the JWT **Authentication** Handshake. For JWT **Personalization** Handshake setup, see [here](/settings/authentication-personalization/personalization-setup/jwt).
-If you don’t have a dashboard, or if you want to keep your dashboard and docs completely separate, you can use your own login flow to authenticate users via a JWT in the URL.
+Use JWT authentication to implement a custom login flow for your documentation.
-## Implementation
+## Quick Setup
-
- Go to your [Mintlify dashboard settings](https://dashboard.mintlify.com/products/authentication) and generate a private key. Store this key somewhere secure where it can be accessed by your backend.
+
+ Generate a private key in your [Mintlify dashboard settings](https://dashboard.mintlify.com/products/authentication). Store this securely for your backend.
-
- Create a login flow that does the following:
- - Authenticate the user
- - Create a JWT containing the authenticated user's info in the [UserInfo](../sending-data) format
- - Sign the JWT with the secret key, using the EdDSA algorithm
- - Create a redirect URL back to the `/login/jwt-callback` path of your docs, including the JWT as the hash
+
+ Create a login endpoint that:
+ - Authenticates the user
+ - Creates a JWT with user info in [UserInfo](../sending-data) format
+ - Signs it using EdDSA algorithm
+ - Redirects to `/login/jwt-callback` with the JWT as hash
-
- Return to your [Mintlify dashboard settings](https://dashboard.mintlify.com/products/authentication) and add the login URL to your Authentication settings.
+
+ Add your login URL to the [Authentication settings](https://dashboard.mintlify.com/products/authentication).
-## Example
-
-I want to set up authentication for my docs hosted at `docs.foo.com`. I want my docs
-to be completely separate from my dashboard (or I don’t have a dashboard at all).
-
-To set up authentication with Mintlify, I go to my Mintlify dashboard and generate a
-JWT secret. I create a web URL `https://foo.com/docs-login` that initiates a login flow
-for my users. At the end of this login flow, once I have verified the identity of the user,
-I create a JWT containing the user’s custom data according to Mintlify’s specification.
-I use a JWT library to sign this JWT with my Mintlify secret, create a redirect URL of the
-form `https://docs.foo.com/login/jwt-callback#{SIGNED_JWT}`, and redirect the user.
-
-I then go to the Mintlify dashboard settings and enter `https://foo.com/docs-login` for the
-Login URL field.
-
-Here's what the code might look like:
+## Code Example
```ts TypeScript
import * as jose from 'jose';
import { Request, Response } from 'express';
-const TWO_WEEKS_IN_MS = 1000 * 60 * 60 * 24 * 7 * 2;
-
const signingKey = await jose.importPKCS8(process.env.MINTLIFY_PRIVATE_KEY, 'EdDSA');
export async function handleRequest(req: Request, res: Response) {
const userInfo = {
- expiresAt: Math.floor((Date.now() + TWO_WEEKS_IN_MS) / 1000), // 2 week session expiration
+ expiresAt: Math.floor((Date.now() + 1000 * 60 * 60 * 24 * 14) / 1000), // 2 week session
groups: res.locals.user.groups,
content: {
firstName: res.locals.user.firstName,
@@ -65,7 +48,7 @@ export async function handleRequest(req: Request, res: Response) {
const jwt = await new jose.SignJWT(userInfo)
.setProtectedHeader({ alg: 'EdDSA' })
- .setExpirationTime('10 s') // 10 second JWT expiration
+ .setExpirationTime('10 s')
.sign(signingKey);
return res.redirect(`https://docs.foo.com/login/jwt-callback#${jwt}`);
@@ -75,7 +58,6 @@ export async function handleRequest(req: Request, res: Response) {
```python Python
import jwt # pyjwt
import os
-
from datetime import datetime, timedelta
from fastapi.responses import RedirectResponse
@@ -85,8 +67,8 @@ private_key = os.getenv(MINTLIFY_JWT_PEM_SECRET_NAME, '')
async def return_mintlify_auth_status(current_user):
jwt_token = jwt.encode(
payload={
- 'exp': int((datetime.now() + timedelta(seconds=10)).timestamp()), # 10 second JWT expiration
- 'expiresAt': int((datetime.now() + timedelta(weeks=2)).timestamp()), # 1 week session expiration
+ 'exp': int((datetime.now() + timedelta(seconds=10)).timestamp()), # 10s JWT expiration
+ 'expiresAt': int((datetime.now() + timedelta(weeks=2)).timestamp()), # 2 week session
'groups': ['admin'] if current_user.is_admin else [],
'content': {
'firstName': current_user.first_name,
@@ -99,4 +81,4 @@ async def return_mintlify_auth_status(current_user):
return RedirectResponse(url=f'https://docs.foo.com/login/jwt-callback#{jwt_token}', status_code=302)
```
-
+
\ No newline at end of file
diff --git a/settings/authentication-personalization/authentication-setup/oauth.mdx b/settings/authentication-personalization/authentication-setup/oauth.mdx
index bd90afae4..b35a7b28b 100644
--- a/settings/authentication-personalization/authentication-setup/oauth.mdx
+++ b/settings/authentication-personalization/authentication-setup/oauth.mdx
@@ -1,49 +1,43 @@
---
title: 'OAuth 2.0 Handshake'
-description: 'Integrate with your OAuth server to enable user login via the Authorization Code flow'
+description: 'Set up user login with OAuth Authorization Code flow'
---
- This is the documentation for the OAuth **Authentication** Handshake. The steps for setting up the [OAuth **Personalization** Handshake](/settings/authentication-personalization/personalization-setup/oauth) are slightly different.
+ This guide covers OAuth **Authentication** setup. For OAuth **Personalization** setup, see [here](/settings/authentication-personalization/personalization-setup/oauth).
-If you have an existing OAuth server, you can integrate with Mintlify for a seamless login experience.
-
-## Implementation
+## Setup Steps
-
- Go to your [Mintlify authentication settings](https://dashboard.mintlify.com/products/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** (optional): The endpoint that will be hit to retrieve user info. If omitted, the OAuth flow will only be used to verify identity, and the user info will be empty.
+
+ In your [Mintlify authentication settings](https://dashboard.mintlify.com/products/authentication), select OAuth and enter:
+
+ - **Authorization URL**: Your OAuth authorization endpoint
+ - **Client ID**: Your OAuth client ID
+ - **Scopes**: Required OAuth scopes
+ - **Token URL**: Your token exchange endpoint
+ - **Info API URL** (optional): Endpoint to get user information
-
- Copy the Redirect URL listed in the [Mintlify authentication settings](https://dashboard.mintlify.com/products/authentication) and add it as an authorized redirect URL for your OAuth server.
+
+ Copy the Redirect URL from your [authentication settings](https://dashboard.mintlify.com/products/authentication) and add it to your OAuth server's authorized redirects.
-
- If you want to take advantage of authentication's customization features, you'll need to create an endpoint to retrieve info about your users.
- 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.
-
- Return to your [Mintlify authentication settings](https://dashboard.mintlify.com/products/authentication) and add the Info API URL
- to your OAuth configuration.
+
+ To enable user customization:
+ 1. Create an API endpoint accessible with OAuth tokens
+ 2. Return user data in [UserInfo](../sending-data) format
+ 3. Add your endpoint URL to the Info API URL field
-## Example
-
-I have an existing OAuth server that supports the Authorization Code 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 Authentication 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.
+## Example Configuration
+
+```json
+{
+ "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"
+}
+```
\ No newline at end of file
diff --git a/settings/authentication-personalization/personalization-setup/oauth.mdx b/settings/authentication-personalization/personalization-setup/oauth.mdx
index b90859f9b..09ebfdc22 100644
--- a/settings/authentication-personalization/personalization-setup/oauth.mdx
+++ b/settings/authentication-personalization/personalization-setup/oauth.mdx
@@ -1,45 +1,53 @@
---
title: 'OAuth 2.0 Handshake'
-description: 'Integrate with your OAuth server to enable user login via the PKCE flow'
+description: 'Set up user login with OAuth PKCE flow'
---
- This is the documentation for the OAuth **Personalization** Handshake. The steps for setting up the [OAuth **Authentication** Handshake](/settings/authentication-personalization/authentication-setup/oauth) are slightly different.
+ This guide covers the OAuth **Personalization** Handshake. For the OAuth **Authentication** Handshake, see [this guide](/settings/authentication-personalization/authentication-setup/oauth).
-If you have an existing OAuth server that supports the PKCE flow, you can integrate with Mintlify for a seamless login experience.
+Learn how to integrate your OAuth server with Mintlify for user login 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 the [UserInfo](../sending-data) format
+ - Note the required scope(s) for this endpoint
-
- Go to your [Mintlify dashboard settings](https://dashboard.mintlify.com/products/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/products/authentication):
+ - Select OAuth option
+ - Fill in:
+ - Authorization URL
+ - Client ID
+ - Required scopes
+ - Token URL
+ - Info API URL
-
- Copy the Redirect URL listed in the [Mintlify dashboard settings](https://dashboard.mintlify.com/products/authentication) and add it as an authorized redirect URL for your OAuth server.
+
+ Add the Redirect URL from your Mintlify dashboard to your OAuth server's authorized redirects.
-## Example
+## Example Setup
-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`.
+For 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.
+1. Create endpoint: `api.foo.com/docs/user-info`
+ - Requires: `docs-user-info` scope
+ - Returns: User data in Mintlify format
-I then go to the Mintlify dashboard settings, navigate to the Personalization 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`
+2. Configure in Mintlify dashboard:
+ ```
+ 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.
+3. Add the Redirect URL from dashboard to your OAuth settings
\ No newline at end of file
diff --git a/settings/authentication-personalization/personalization-setup/shared-session.mdx b/settings/authentication-personalization/personalization-setup/shared-session.mdx
index a73aa0a83..c64b7d96c 100644
--- a/settings/authentication-personalization/personalization-setup/shared-session.mdx
+++ b/settings/authentication-personalization/personalization-setup/shared-session.mdx
@@ -7,7 +7,7 @@ description: 'Seamlessly share user sessions between your dashboard and your doc
This is the documentation for the Shared Session **Personalization** Handshake. The Shared Session Handshake is not available for Authentication.
-This method utilizes the session authentication info already stored in your user’s browser to create a seamless documentation experience.
+This method utilizes the session authentication info already stored in your user's browser to create a seamless documentation experience.
## Implementation
@@ -15,40 +15,28 @@ This method utilizes the session authentication info already stored in your user
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.
-
+ For cross-domain setups, configure your API endpoint with:
+ - `Access-Control-Allow-Origin` header set to your docs domain (not `*`)
+ - `Access-Control-Allow-Credentials` header set to `true`
+
+
+ These CORS settings should only be enabled on the user info endpoint, not all dashboard routes.
+
Go to your [Mintlify dashboard settings](https://dashboard.mintlify.com/products/authentication) and add the API URL and your Login URL to your Personalization settings.
-## Examples
+## Example Setup
-### Dashboard at subdomain, docs at subdomain
+Here's a typical setup example:
-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`.
+- Dashboard location: `dash.foo.com` (with API at `dash.foo.com/api`)
+- Docs location: `docs.foo.com`
+- User info endpoint: `dash.foo.com/api/docs/user-info`
-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
-
-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`.
-
-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.
-
-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
+In this case:
+1. Create the user info endpoint that returns data according to Mintlify's specification
+2. Configure CORS headers for `https://docs.foo.com` on this endpoint
+3. Add `https://dash.foo.com/api/docs/user-info` as your API URL in Mintlify dashboard settings
\ No newline at end of file
diff --git a/settings/authentication-personalization/personalization.mdx b/settings/authentication-personalization/personalization.mdx
index 37c4af910..6acdafdfb 100644
--- a/settings/authentication-personalization/personalization.mdx
+++ b/settings/authentication-personalization/personalization.mdx
@@ -7,76 +7,36 @@ description: 'A list of features unlocked with Personalization'
Personalization is an enterprise feature. To get access, [contact sales](mailto:sales@mintlify.com).
-Personalization refers to a suite of features that allow you to customize your
-documentation experience based on some information about the user. There are
-three major features of Personalization:
+Personalization lets you customize your documentation based on user information. Here are the three main features:
-- **Customize MDX content** with a user's information, such as their name, plan, or title.
+- **Custom Content**: Display personalized MDX content using user data (name, plan, etc.)
+- **API Keys**: Auto-fill API Playground inputs
+- **Page Access**: Control page visibility based on user groups
-- **Prefill API keys** in the API Playground for streamlined use.
+## Using Personalization
-- **Selectively show pages** in the navigation based on a user's groups.
-
-## How to Use
-
-### Customizing MDX Content
-
-When writing content, you can use the `userContext` variable to access the information you have sent to your docs. Here's a simple example:
-
-Hello, {userContext.name ?? 'reader'}!
+### Custom Content
+Access user information with the `userContext` variable:
```jsx
Hello, {userContext.name ?? 'reader'}!
```
-This feature becomes even more powerful when paired with custom data about the user. Here's a real world example that allows us to give specific instructions on how to access the Personalization feature based on the customer's existing plan:
-
-Personalization is an enterprise feature. {
-userContext.org === undefined
-? <>To access this feature, first create an account at the Mintlify dashboard.>
-: userContext.org.plan !== 'enterprise'
- ? <>You are currently on the ${userContext.org.plan ?? 'free'} plan. To speak to our team about upgrading, contact our sales team.>
- : <>To request this feature for your enterprise org, contact our team.>
-}
-
-```jsx
-Personalization is an enterprise feature. {
- userContext.org === undefined
- ? <>To access this feature, first create an account at the Mintlify dashboard.>
- : userContext.org.plan !== 'enterprise'
- ? <>You are currently on the ${userContext.org.plan ?? 'free'} plan. To speak to our team about upgrading, contact our sales team.>
- : <>To request this feature for your enterprise org, contact our team.>
-}
-```
-
- The information in `userContext` is only available after a user has logged in. For logged out users, the value of `userContext` will be `{}`. To prevent the page from crashing for logged-out users, always use optional chaining on your `userContext` fields, e.g. `{userContext.org?.plan}`
+ Always use optional chaining (e.g., `userContext.org?.plan`) as `userContext` will be empty (`{}`) for logged-out users.
-### Prefilling API Keys
-
-If you return API Playground inputs in the user info, they will automatically be prefilled in the API Playground. Make sure the name of the field in the user info is an exact match of the name in the API Playground.
+### API Keys
+API Playground inputs are automatically prefilled when matching field names are provided in the user info.
-### Showing/Hiding Pages
-
-By default, every page is visible to every user. If you want to restrict which pages are visible to your users, you can add a `groups` field in your page metadata.
-When determining which pages to show to the user, Mintlify will check which groups the user belongs to.
-If the user is not in any of the groups listed in the page metadata, the page will not be shown.
+### Page Visibility
+Control page access by adding a `groups` field to your page metadata:
```md
---
-title: 'Managing Your Users'
-description: 'Adding and removing users from your organization'
+title: 'Example Page'
groups: ['admin']
---
```
-Here's a table that displays whether a page is shown for different combinations of `groups` in UserInfo and page metadata:
-
-| | `groups` not in UserInfo | `groups: []` in UserInfo | `groups: ['admin']` in UserInfo |
-| :------------------------------ | :----------------------: | :----------------------: | :-----------------------------: |
-| `groups` not in metadata | ✅ | ✅ | ✅ |
-| `groups: []` in metadata | ❌ | ❌ | ❌ |
-| `groups: ['admin']` in metadata | ❌ | ❌ | ✅ |
-
-Note that an empty array in the page metadata is interpreted as "No groups should see this page."
\ No newline at end of file
+Only users belonging to the specified groups will see pages with group restrictions.
\ No newline at end of file