-
Notifications
You must be signed in to change notification settings - Fork 215
Document mint validate CLI command #2736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -15,13 +15,13 @@ | |||||
| alt="Decorative graphic representing the CLI." | ||||||
| /> | ||||||
|
|
||||||
| Use the [CLI](https://www.npmjs.com/package/mint) to preview your documentation locally as you write and edit. View changes in real-time before deploying, test your documentation site's appearance and functionality, and catch issues like broken links or accessibility problems. | ||||||
|
|
||||||
| The CLI also has utilities for maintaining your documentation, including commands to rename files, validate OpenAPI specifications, and migrate content between formats. | ||||||
|
|
||||||
| ## Prerequisites | ||||||
|
|
||||||
| - [Node.js](https://nodejs.org/en) v20.17.0+ (LTS versions recommended) installed | ||||||
| - [Git](https://git-scm.com/downloads) installed | ||||||
| - Your documentation repository cloned locally | ||||||
|
|
||||||
|
|
@@ -178,7 +178,7 @@ | |||||
| mint broken-links | ||||||
| ``` | ||||||
|
|
||||||
| The command ignores files matching [.mintignore](/organize/mintignore) patterns. Links that point to ignored files are reported as broken. | ||||||
|
|
||||||
| ### Find accessibility issues | ||||||
|
|
||||||
|
|
@@ -198,6 +198,19 @@ | |||||
| mint a11y --skip-alt-text | ||||||
| ``` | ||||||
|
|
||||||
| ### Validate documentation build | ||||||
|
|
||||||
| Validate your documentation build in strict mode, which exits with an error if there are any warnings or errors. Use this command for CI/CD pipelines to prevent broken documentation deployments. | ||||||
|
|
||||||
| ```bash | ||||||
| mint validate | ||||||
| ``` | ||||||
|
|
||||||
| Use flags to configure the validation command. | ||||||
|
|
||||||
| - `--groups [groupname]`: Mock user groups for validation (useful when testing partial authentication) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor nit: using
Suggested change
|
||||||
| - `--disable-openapi`: Disable OpenAPI file generation during validation | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ### Check OpenAPI spec | ||||||
|
|
||||||
| Check your OpenAPI file for errors with the following command: | ||||||
|
|
@@ -228,7 +241,7 @@ | |||||
|
|
||||||
| ## Formatting | ||||||
|
|
||||||
| While developing locally, we recommend using extensions in your IDE to recognize and format MDX files. | ||||||
|
|
||||||
| If you use Cursor, Windsurf, or VS Code, we recommend the [MDX VS Code 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. | ||||||
|
|
||||||
|
|
@@ -278,7 +291,7 @@ | |||||
| ``` | ||||||
| </Accordion> | ||||||
| <Accordion title="Client version shows 'none' after installation"> | ||||||
| If you run `mint version` and the client version displays as `none`, the CLI may be unable to download the client application due to a corporate firewall or VPN blocking the download. | ||||||
|
Check warning on line 294 in installation.mdx
|
||||||
|
|
||||||
| **Solution:** Ask your IT administrator to whitelist `releases.mintlify.com` to enable local development with the CLI. | ||||||
| </Accordion> | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider calling out the non-zero exit code explicitly (makes the CI behavior clearer).