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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions development.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ description: 'Preview changes locally to update your docs'
mintlify dev
```

Alternatively, if you do not want to install Mintlify globally you can use a run script available:
If you prefer not to install Mintlify globally, you can use one of these available run scripts:

<CodeGroup>
```bash npm
Expand All @@ -51,28 +51,28 @@ Alternatively, if you do not want to install Mintlify globally you can use a run
</CodeGroup>

<Warning>
Yarn's "dlx" run script requires yarn version >2. See [here](https://yarnpkg.com/cli/dlx) for more information.
The Yarn "dlx" run script requires Yarn version >2. See the [Yarn documentation](https://yarnpkg.com/cli/dlx) for more information.
</Warning>

A local preview of your documentation 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:
By default, Mintlify uses port 3000. You can customize the port by using the `--port` flag. For example, to run Mintlify on port 3333, use this command:

```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:
If the specified port is already in use, Mintlify will automatically 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:
Each CLI release is associated with a specific version of Mintlify. If your local website doesn't match the production version, update the CLI using one of these commands:

<CodeGroup>

Expand All @@ -92,15 +92,15 @@ Please note that each CLI release is associated with a specific version of Mintl

## Validating Links

The CLI can assist with validating reference links made in your documentation. To identify any broken links, use the following command:
The CLI includes a tool to help validate reference links in your documentation. To identify broken links, use this command:

```bash
mintlify broken-links
```

## Deployment

If the deployment is successful, you should see the following:
A successful deployment will show this confirmation screen:

<Frame>
<img
Expand All @@ -111,21 +111,24 @@ 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.
We recommend using IDE extensions to properly handle and format MDX files. For VSCode users, we suggest:

- The [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

<AccordionGroup>
<Accordion title='Error: Could not load the "sharp" module using the darwin-arm64 runtime'>

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`
This issue may be caused by an outdated version of Node.js. Try these steps:
1. Remove the currently-installed version of Mintlify: `npm remove -g mintlify`
2. Upgrade to Node.js v19 or higher
3. Reinstall Mintlify: `npm install -g mintlify`
</Accordion>

<Accordion title="Issue: Encountering an unknown error">

Solution: Go to the root of your device and delete the \~/.mintlify folder. Afterwards, run `mintlify dev` again.
Solution: Navigate to the root of your device and delete the ~/.mintlify folder. Then run `mintlify dev` again.
</Accordion>
</AccordionGroup>
</AccordionGroup>
11 changes: 9 additions & 2 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,17 @@
"icon": "pen-paintbrush",
"pages": [
"development",
"web-editor",
"reusable-snippets",
"web-editor"
]
},
"settings/global",
"settings/navigation",
"migration"
"migration",
"development",
"settings/preview-deployments",
"settings/seo"
]
},
{
Expand Down Expand Up @@ -118,7 +123,9 @@
"settings/add-members",
"settings/github",
"settings/gitlab",
"settings/preview-deployments"
"settings/preview-deployments",
"settings/authentication",
"settings/navigation"
]
},
{
Expand Down
52 changes: 24 additions & 28 deletions reusable-snippets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,24 @@ Yourself), which applies to documentation as
well. If you find yourself repeating the same content in multiple places, you
should create a custom snippet to keep your content in sync.

## Creating a custom snippet
## Creating a Custom Snippet

**Pre-condition**: You must create your snippet file in the `snippets` directory in order for the import to work.
**Prerequisite**: You must create your snippet file in the `snippets` directory for the import to work.

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.
Any page in the `snippets` directory will be treated as a snippet and will not
be rendered as a standalone page. If you want to create a standalone page
from the snippet, import the snippet into another file and use it as a
component.

### Default Export

### Default export

1. Add content to your snippet file that you want to re-use. Optionally, you can add variables that can be filled in via props
when you import the snippet. In this example, our variable is word.
1. Add content to your snippet file that you want to reuse:

```typescript snippets/my-snippet.mdx
Hello world! This is my content I want to reuse across pages.
```


2. Import the snippet into your destination file.
2. Import the snippet into your destination file:

```typescript destination-file.mdx
---
Expand All @@ -41,22 +38,21 @@ import MySnippet from '/snippets/path/to/my-snippet.mdx';

## Header

Lorem impsum dolor sit amet.
Lorem ipsum dolor sit amet.

<MySnippet/>

```

### Exporting with variables
### Exporting with Variables

1. Optionally, you can add variables that can be filled in via props when you import the snippet. In this example, our variable is word.
1. Add variables that can be filled in via props when you import the snippet. In this example, our variable is `word`:

```typescript snippets/my-snippet.mdx
My keyword of the day is {word}.
```


2. Import the snippet into your destination file with the variable. The property will fill in based on your specification.
2. Import the snippet into your destination file with the variable. The property will be filled based on your specification:

```typescript destination-file.mdx
---
Expand All @@ -68,13 +64,13 @@ import MySnippet from '/snippets/path/to/my-snippet.mdx';

## Header

Lorem impsum dolor sit amet.
Lorem ipsum dolor sit amet.

<MySnippet word="bananas" />

```

### Reusable variables
### Reusable Variables

1. Export a variable from your snippet file:

Expand All @@ -97,10 +93,10 @@ import { myName, myObject } from '/snippets/path/to/custom-variables.mdx';
Hello, my name is {myName} and I like {myObject.fruit}.
```

### Reusable components
### 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.
your component as an arrow function:

```typescript snippets/custom-component.mdx
export const MyComponent = ({ title }) => (
Expand All @@ -112,11 +108,11 @@ export const MyComponent = ({ title }) => (
```

<Warning>
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.
MDX does not compile inside the body of an arrow function. Use HTML
syntax when possible, or use a default export if you need to use MDX.
</Warning>

2. Import the snippet into your destination file and pass in the props
2. Import the snippet into your destination file and pass in the props:

```typescript destination-file.mdx
---
Expand All @@ -133,9 +129,9 @@ Lorem ipsum dolor sit amet.

### 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.
By default, Mintlify uses server-side rendering, generating content
at build time. For client-side content loading, verify the
`document` object's availability before initiating the rendering process:

```typescript snippets/client-component.mdx
{/* `setTimeout` simulates a React.useEffect, which is called after the component is mounted. */}
Expand All @@ -153,4 +149,4 @@ export const ClientComponent = () => {
return <div id="client-component"></div>
}
}
```
```
26 changes: 13 additions & 13 deletions settings/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Customize how your team can login to your Mintlify dashboard"
icon: 'user-unlock'
---

Mintlify supports single sign-on to your dashboard via SAML and OIDC. If you use Okta or Google Workspace, we have provider-specific documentation for setting up SSO, but if you use another provider, please contact us!
Mintlify supports Single Sign-On (SSO) to your dashboard via SAML and OIDC. If you use Okta or Google Workspace, we have provider-specific documentation for setting up SSO. If you use another provider, please contact us!

<Note>
SSO functionality is available on our Enterprise plan. [Contact
Expand All @@ -20,18 +20,18 @@ Mintlify supports single sign-on to your dashboard via SAML and OIDC. If you use
Under `Applications`, click to create a new app integration using SAML 2.0.
</Step>
<Step title="Configure integration">
Enter the following:
* Single sign-on URL (provided by Mintlify)
Enter the following information:
* Single Sign-On URL (provided by Mintlify)
* Audience URI (provided by Mintlify)
* Name ID Format: `EmailAddress`
* Attribute Statements:
| Name | Name format | Value
| Name | Name Format | Value
| ---- | ----------- | -----
| `firstName` | Basic | `user.firstName` |
| `lastName` | Basic | `user.lastName` |
</Step>
<Step title="Send us your IdP information">
Once the application is set up, navigate to the sign-on tab and send us the metadata URL.
Once the application is set up, navigate to the Sign-On tab and send us the metadata URL.
We'll enable the connection from our side using this information.
</Step>
</Steps>
Expand All @@ -43,11 +43,11 @@ Mintlify supports single sign-on to your dashboard via SAML and OIDC. If you use
You should choose the `Web Application` application type.
</Step>
<Step title="Configure integration">
Select the authorization code grant type and enter the Redirect URI provided by Mintlify.
Select the Authorization Code grant type and enter the Redirect URI provided by Mintlify.
</Step>
<Step title="Send us your IdP information">
Once the application is set up, navigate to the General tab and locate the client ID & client secret.
Please securely provide us with these, along with your Okta instance URL (e.g. `<your-tenant-name>.okta.com`). You can send these via a service like 1Password or SendSafely.
Once the application is set up, navigate to the General tab and locate the Client ID and Client Secret.
Please securely provide us with these, along with your Okta instance URL (e.g., `<your-tenant-name>.okta.com`). You can send these via a service like 1Password or SendSafely.
</Step>
</Steps>
</Tab>
Expand All @@ -65,23 +65,23 @@ Mintlify supports single sign-on to your dashboard via SAML and OIDC. If you use
</Frame>
</Step>
<Step title="Send us your IdP information">
Copy the provided SSO URL, Entity ID, and x509 certificate and send it to the Mintlify team.
Copy the provided SSO URL, Entity ID, and X.509 certificate and send them to the Mintlify team.
<Frame>
![](/images/gsuite-saml-metadata.png)
</Frame>
</Step>
<Step title="Configure integration">
On the Service provider details page, enter the following:
On the Service Provider details page, enter the following:
* ACS URL (provided by Mintlify)
* Entity ID (provided by Mintlify)
* Name ID format: `EMAIL`
* Name ID Format: `EMAIL`
* Name ID: `Basic Information > Primary email`

<Frame>
![](/images/gsuite-sp-details.png)
</Frame>

On the next page, enter the following attribute statements:
On the next page, enter the following Attribute Statements:
| Google Directory Attribute | App Attribute |
| -------------------------- | ------------- |
| `First name` | `firstName` |
Expand All @@ -92,4 +92,4 @@ Mintlify supports single sign-on to your dashboard via SAML and OIDC. If you use
</Steps>
</Tab>

</Tabs>
</Tabs>
Loading
Loading