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
30 changes: 16 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:
Alternatively, if you don't want to install Mintlify globally, you can use a run script:

<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.
Yarn's `dlx` run script requires Yarn version >2. See [here](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 Mintlify runs on 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 you attempt to run Mintlify on a port that's already in use, it 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 align with the production version, update the CLI:

<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 Mintlify CLI can help validate reference links in your documentation. To identify any broken links, use the following command:

```bash
mintlify broken-links
```

## Deployment

If the deployment is successful, you should see the following:
After a successful deployment, you should see the following:

<Frame>
<img
Expand All @@ -111,21 +111,23 @@ 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.
For optimal code formatting and syntax recognition, we recommend using extensions in your IDE. For VSCode users, we suggest:
- [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 error may occur due to an outdated version of Node.js. Try the following:
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>
Loading
Loading