Skip to content

Latest commit

 

History

History
108 lines (74 loc) · 2.64 KB

development.mdx

File metadata and controls

108 lines (74 loc) · 2.64 KB
title description
Development
Preview changes locally to update your docs
**Prerequisite** You should have installed Node.js (version 18.10.0 or higher).

Step 1. Install Mintlify on your OS:

npm i -g mintlify
yarn global add mintlify

Step 2. Go to the docs directory (where you can find mint.json) and run the following command:

mintlify dev

The documentation website is now available at http://localhost:3000.

Custom Ports

Mintlify uses port 3000 by default. You can use the --port flag to customize the port Mintlify runs on. For example, use this command to run in port 3333:

mintlify dev --port 3333

You will see an error like this if you try to run Mintlify in a port that's already taken:

Error: listen EADDRINUSE: address already in use :::3000

Mintlify Versions

Each CLI is linked to a specific version of Mintlify. Please update the CLI if your local website looks different than production.

npm i -g mintlify@latest
yarn global upgrade mintlify

Validating Links

The CLI can help you validate reference links made in your docs. If you have pages that reference other pages, use the following command to identify any broken links.

mintlify broken-links

Deployment

Unlimited editors available under the [Startup Plan](https://mintlify.com/pricing)

You should see the following if the deploy successfully went through:

Code Formatting

We recommend using extensions on your preferred IDE to recognize and format MDX. For VSCode users, we recommend this MDX VSCode extension for syntax highlighting and Prettier for formatting.

Troubleshooting

Here's how to solve some common problems when working with the CLI.

Update to Node v18. Run `mintlify install` and try again. Go to the `C:/Users/Username/.mintlify/` directory and remove the `mint` folder. Then Open the Git Bash in this location and run `git clone https://github.com/mintlify/mint.git`.

Repeat step 3.

Try navigating to the root of your device and delete the ~/.mintlify folder. Then run `mintlify dev` again.