Skip to content

Commit 80d13d6

Browse files
Documentation edits made through Mintlify web editor
1 parent 9f9e9aa commit 80d13d6

File tree

25 files changed

+430
-1948
lines changed

25 files changed

+430
-1948
lines changed

advanced/rest-api/overview.mdx

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,28 @@
22
title: Overview
33
---
44

5-
## Trigger Updates
6-
7-
Leverage the REST API to programmatically trigger an update when desired.
8-
The primary use-case will be to trigger updates. We will be adding more and more
9-
functionality to the API overtime. Let us know what else you want to see in
10-
[our community](https://mintlify.com/community)!
11-
125
## Authentication
136

14-
You can generate an API key through
15-
[the dashboard](https://dashboard.mintlify.com/settings/integrations). The API key is
16-
associated with the entire org and can be used across multiple deployments.
7+
Generate an API key through [the dashboard](https://dashboard.mintlify.com/settings/integrations). This key works across all deployments within your organization.
178

189
<Frame>
1910
<img src="/images/external-api-key.png" />
2011
</Frame>
2112

13+
## Trigger Updates
14+
15+
Use our REST API to programmatically trigger documentation updates. Additional API functionality will be added based on user feedback. Share your suggestions in [our community](https://mintlify.com/community).
16+
2217
## Discovery API
2318

24-
The Discovery API allows you to embed an AI chat experience grounded in your docs and continually kept up to date into any application of your choosing.
25-
Responses include citations so you can point your users to the right places they need to get help.
19+
The Discovery API enables AI-powered chat experiences within your documentation. Key features:
20+
- Embedded chat interface for any application
21+
- Responses include citations to source documentation
22+
- Automatically stays synchronized with your content
2623

27-
## Getting Started
24+
### Setup
2825

29-
To get started, you'll need to generate a Discovery API key in the [dashboard](https://dashboard.mintlify.com/products/chat/widget):
26+
1. Generate a Discovery API key in the [dashboard](https://dashboard.mintlify.com/products/chat/widget):
3027

3128
<Frame>
3229
<img
@@ -36,10 +33,7 @@ To get started, you'll need to generate a Discovery API key in the [dashboard](h
3633
</Frame>
3734

3835
<Note>
39-
The Discovery API token is a public token that can be referenced in your
40-
frontend code whereas the API key is a server-side token that should be kept
41-
secret.
36+
The Discovery API token is public and safe for frontend code. Keep the API key secure on your server side.
4237
</Note>
4338

44-
Now that you have an API key, check out our [example](https://github.com/mintlify/discovery-api-example) for how to use
45-
the API for AI chat. You can also see a deployed version of this example at [chat.mintlify.com](https://chat.mintlify.com).
39+
2. See our [example implementation](https://github.com/mintlify/discovery-api-example) or view the [live demo](https://chat.mintlify.com).

advanced/subpath/cloudflare.mdx

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,20 @@ title: "Cloudflare"
33
description: "Host documentation at a /docs subpath using Cloudflare Workers"
44
---
55

6-
## Create Cloudflare Worker
6+
## Quick Setup Guide
77

8-
Navigate to the `Workers & Pages > Create application > Create worker`. You
9-
should be able to presented with the following screen where you can create a new
10-
Cloudlfare worker.
8+
1. Create a Worker
9+
- Go to `Workers & Pages > Create application > Create worker`
10+
- Give your worker a name and create it
1111

1212
<Frame>
1313
<img alt="Create a Cloudflare worker" src="/images/cloudflare/worker.png" />
1414
</Frame>
1515

16-
### Add custom domain
17-
18-
Once the worker is created, click `Configure worker`. Navigate to the worker
19-
`Settings > Triggers`. Click on `Add Custom Domain` to add your desired domain
20-
into the list - we recommend you add both the version with and without `www.`
21-
prepended to the domain.
16+
2. Add Your Domain
17+
- Go to `Settings > Triggers`
18+
- Click `Add Custom Domain`
19+
- Add your domain (both with and without `www.`)
2220

2321
<Frame>
2422
<img
@@ -27,23 +25,16 @@ prepended to the domain.
2725
/>
2826
</Frame>
2927

30-
If you have trouble setting up a custom subdirectory,
31-
[contact our support team](mailto:[email protected]) and we'll walk you through
32-
upgrading your hosting with us.
33-
34-
### Edit Worker Script
35-
36-
Click on `Edit Code` and add the following script into the worker's code.
28+
3. Add the Worker Script
29+
- Click `Edit Code`
30+
- Copy the script below
31+
- Replace `[SUBDOMAIN]` and `[YOUR_DOMAIN]` with your values
32+
- Click `Deploy`
3733

3834
<Frame>
3935
<img alt="Cloudflare edit code" src="/images/cloudflare/edit-code.png" />
4036
</Frame>
4137

42-
<Tip>
43-
Edit `DOCS_URL` by replacing `[SUBDOMAIN]` with your unique subdomain and
44-
`CUSTOM_URL` with your website's base URL.
45-
</Tip>
46-
4738
```javascript
4839
addEventListener("fetch", (event) => {
4940
event.respondWith(handleRequest(event.request));
@@ -52,9 +43,7 @@ addEventListener("fetch", (event) => {
5243
async function handleRequest(request) {
5344
try {
5445
const urlObject = new URL(request.url);
55-
// If the request is to the docs subdirectory
5646
if (/^\/docs/.test(urlObject.pathname)) {
57-
// Then Proxy to Mintlify
5847
const DOCS_URL = "[SUBDOMAIN].mintlify.dev";
5948
const CUSTOM_URL = "[YOUR_DOMAIN]";
6049

@@ -70,11 +59,9 @@ async function handleRequest(request) {
7059
return await fetch(proxyRequest);
7160
}
7261
} catch (error) {
73-
// if no action found, play the regular request
7462
return await fetch(request);
7563
}
7664
}
7765
```
7866

79-
Click on `Deploy` and wait for the changes to propagate (it can take up to a few
80-
hours).
67+
> Note: Changes may take a few hours to propagate. Need help? [Contact our support team](mailto:[email protected]).

advanced/widget/chat.mdx

Lines changed: 20 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ description: "Integrate the Mintlify widget into your products to offer users qu
99

1010
## Getting started
1111

12-
First, generate an API key in [the Mintlify dashboard](https://dashboard.mintlify.com/chat/widget-auth).
12+
1. Generate an API key in [the Mintlify dashboard](https://dashboard.mintlify.com/chat/widget-auth).
1313

14-
<Frame>
15-
![widget](https://mintlify-assets.b-cdn.net/widget/key.webp)
16-
</Frame>
14+
2. Add the widget to your site:
1715

18-
## Installation
19-
20-
Add the widget by adding these script tags into your site's `<head>...<head/>` tag.
16+
### HTML Installation
17+
Add these scripts to your site's `<head>` tag:
2118

2219
```html
2320
<script>
@@ -40,7 +37,8 @@ Add the widget by adding these script tags into your site's `<head>...<head/>` t
4037
</script>
4138
```
4239

43-
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:
40+
### React Installation
41+
For React and Next.js apps, use our React component:
4442

4543
```jsx
4644
<MintlifyWidget
@@ -50,73 +48,22 @@ To use the widget in React and Next.js apps, use the React component from the `@
5048
/>
5149
```
5250

53-
## Usage
54-
55-
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:
56-
57-
| Prop | Type | Description |
58-
| ------------ | ------------------------------------------------------------------- | ---------------------------------------------------------- |
59-
| `connection` | [MintlifyWidgetConnectionProps](#mintlifywidgetconnectionProps) | Information needed to connect to our API. Required. |
60-
| `display?` | [MintlifyWidgetDisplayProps](#mintlifywidgetdisplayProps) | Configurations for the widget appearance and interactions. |
61-
| `tracking?` | [MintlifyWidgetTrackingFunctions](#mintlifywidgettrackingfunctions) | Callback functions for tracking analytics. |
62-
63-
### MintlifyWidgetConnectionProps
64-
65-
| Prop | Type | Description |
66-
| -------- | -------- | ----------------------------------------------------------- |
67-
| `apiKey` | `string` | Widget API key generated from Mintlify dashboard. Required. |
68-
| `url?` | `string` | Used for internal testing only |
69-
70-
### MintlifyWidgetDisplayProps
71-
72-
| Prop | Type | Description |
73-
| ------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------- |
74-
| `trigger?` | [MintlifyWidgetDisplayTriggerProps](#mintlifywidgetdisplaytriggerprops) | Appearance of the trigger. |
75-
| `colors?` | [MintlifyWidgetDisplayColorsProps](#mintlifywidgetdisplaycolorsprops) | Colors used across the widget. |
76-
| `chat?` | [MintlifyWidgetDisplayChatProps](#mintlifywidgetdisplaychatprops) | Configs specific to AI chat. |
77-
| `isDarkMode?` | `boolean` | Controlled dark mode appearance. Defaults to OS preference. |
78-
79-
#### MintlifyWidgetDisplayTriggerProps
80-
81-
| Prop | Type | Description |
82-
| ------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
83-
| `type?` | `'button'`\|`'input'` | Type of the trigger to display. Defaults to `button`. |
84-
| `label?` | `string` | Label displayed in the trigger. Defaults to `Get help` for the button trigger and `Ask anything...` for the input trigger. |
85-
| `buttonIcon?` | `'chat'`\|`'sparkles'`\|`'mintlify'` | Icon used in the trigger. Only available for the `button` trigger. Defaults to `chat`. |
86-
| `iconOnly?` | `boolean` | Only show icon in the trigger or not. Defaults to `false`. |
87-
88-
Here is an overview of what the trigger looks like with different configurations.
89-
90-
| `type='input'` | |
91-
| -------------- | ------------------------------------------------------------ |
92-
| | <img style={{height:'80px'}} src="https://mintlify-assets.b-cdn.net/widget/input.png"/> |
93-
94-
| `type='button'` | `'chat'` | `'sparkles'` | `'mintlify'` |
95-
| ---------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
96-
| `iconOnly=false` | <img style={{height:'80px'}} src="https://mintlify-assets.b-cdn.net/widget/button-chat.png"/> | <img style={{height:'80px'}} src="https://mintlify-assets.b-cdn.net/widget/button-sparkles.png"/> | <img style={{height:'80px'}} src="https://mintlify-assets.b-cdn.net/widget/button-mintlify.png"/> |
97-
| `iconOnly=true` | <img style={{height:'80px'}} src="https://mintlify-assets.b-cdn.net/widget/button-chat-iconOnly.png"/> | <img style={{height:'80px'}} src="https://mintlify-assets.b-cdn.net/widget/button-sparkles-iconOnly.png"/> | <img style={{height:'80px'}} src="https://mintlify-assets.b-cdn.net/widget/button-mintlify-iconOnly.png"/> |
98-
99-
#### MintlifyWidgetDisplayColorsProps
51+
## Configuration Options
10052

101-
| Prop | Type | Description |
102-
| --------------- | -------- | -------------------------------------------------------- |
103-
| `primary?` | `string` | Primary color used in the widget. Defaults to `#0D9373`. |
104-
| `primaryLight?` | `string` | Primary color in dark mode. Defaults to `#55D799`. |
53+
### Core Settings
10554

106-
#### MintlifyWidgetDisplayChatProps
55+
| Prop | Description |
56+
| ------------ | ---------------------------------------------------------- |
57+
| `connection` | Required. Contains API connection details (`apiKey`) |
58+
| `display` | Optional. Customize widget appearance and interactions |
59+
| `tracking` | Optional. Add analytics tracking functions |
10760

108-
| Prop | Type | Description |
109-
| ------------------------ | ---------- | ------------------------------------------------------------------ |
110-
| `openCitationInSameTab?` | `boolean` | Open the citation url in the same tab or not. Defaults to `false`. |
111-
| `exampleQueries?` | `string[]` | Example queries to prompt the user to ask. Defaults to `[]`. |
61+
### Display Customization
11262

113-
### MintlifyWidgetTrackingFunctions
63+
- **Trigger Types**: Choose between `button` or `input` display
64+
- **Colors**: Customize `primary` and `primaryLight` colors
65+
- **Dark Mode**: Toggle with `isDarkMode`
66+
- **Chat Settings**: Configure example queries and citation behavior
11467

115-
| Prop | Type | Description |
116-
| --------------------- | ------------------------------------------ | -------------------------------------------------- |
117-
| `trackChatEnter` | `()=> void` | Triggered when the user opens the chat widget. |
118-
| `trackCitationClick` | `(title: string, url: string)=> void` | Triggered when the user clicks on a citation. |
119-
| `trackChatThumbsUp` | `(query: string, response: string)=> void` | Triggered when the user thumbs up on a response. |
120-
| `trackChatThumbsDown` | `(query: string, response: string)=> void` | Triggered when the user thumbs down on a response. |
121-
| `trackChatFollowup` | `(query: string)=> void` | Triggered when the user asks a question. |
122-
| `trackChatClose` | `(queriesCount: number)=> void` | Triggered when the user exits the chat widget. |
68+
For detailed configuration options and examples, see our [advanced configuration guide]()</fileContent>
69+
</invoke>
Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
---
22
title: 'MDX Setup'
3-
description: 'Generate docs pages for your API endpoints using MDX'
3+
description: 'Configure API endpoints documentation using MDX'
44
---
55

6-
Mintlify allows you to define your API endpoints using a combination of `mint.json` configuration, MDX metadata fields, and the `<ParamFields />` component. From the defined endpoints, we generate an API playground, request examples, and response examples.
6+
Learn how to set up API documentation with MDX and generate an interactive API playground.
77

88
<Steps>
9-
<Step title="Configure your API">
10-
In your `mint.json` file, define your base URL and auth method:
9+
<Step title="Configure API settings">
10+
Add your API configuration to `mint.json`:
1111

1212
```json
1313
{
1414
"api": {
15-
"baseUrl": "https://mintlify.com/api", // string array for multiple base URLs
15+
"baseUrl": "https://mintlify.com/api",
1616
"auth": {
17-
"method": "bearer" // options: bearer, basic, key.
17+
"method": "bearer"
1818
}
1919
}
2020
}
2121
```
2222

23-
If you would not like to show an API playground, you don't need to include auth types. Hide the playground with the following field:
23+
To hide the API playground, use:
2424

2525
```json
2626
{
@@ -31,13 +31,10 @@ Mintlify allows you to define your API endpoints using a combination of `mint.js
3131
}
3232
}
3333
```
34-
35-
Find a full list of API configurations [here](/settings/global#api-configurations).
3634
</Step>
3735

38-
<Step title="Create your endpoint pages">
39-
40-
Each API endpoint page should have a corresponding MDX file. At the top of each file, define:
36+
<Step title="Create endpoint pages">
37+
Create an MDX file for each endpoint with the following metadata:
4138

4239
```md
4340
---
@@ -46,20 +43,17 @@ Mintlify allows you to define your API endpoints using a combination of `mint.js
4643
---
4744
```
4845

49-
You can specify path parameters by adding the parameter name to the path, wrapped with `{}`:
50-
46+
For paths with parameters, use `{parameterName}`:
5147
```bash
5248
https://api.example.com/v1/endpoint/{userId}
5349
```
5450

5551
<Note>
56-
57-
If you have `baseUrl` configured in [mint.json](/settings/global), you can use relative paths like `/v1/endpoint`.
58-
52+
With `baseUrl` configured, you can use relative paths like `/v1/endpoint`
5953
</Note>
6054
</Step>
6155

62-
<Step title="Add your endpoints to your docs">
63-
Add your endpoint pages to the sidebar by adding the paths to the `navigation` field in your `mint.json`. Learn more about structuring your docs [here](/settings/navigation).
56+
<Step title="Add to navigation">
57+
Add your endpoint pages to the `navigation` field in `mint.json` to display them in your sidebar.
6458
</Step>
65-
</Steps>
59+
</Steps>

0 commit comments

Comments
 (0)