Docs
Formats
MDX
MDX
Learn how Vale handles MDX content.
MDX is supported through the external program mdx2vast
. To get
started, you’ll need to install the CLI:
bashCopy $ npm install -g mdx2vast
You’ll need to ensure that the mdx2vast
executable is available in your $PATH
(this should happen automatically).
The supported extension is .mdx
.
By default, Vale ignores:
- Front matter: Blocks surrounded by
---
or+++
delimiters. - Fenced blocks: Blocks surrounded by three or more backticks.
- Code spans: Text surrounded by backticks.
- URLs: See URL handling for more information.
- JSX expressions and components.
- ESM imports and exports.
Comments
Vale supports comment-based configuration in MDX files:
Turn Vale off entirely:
mdxCopy {/* vale off */} This text will be ignored. {/* vale on */}
Turn off a specific rule:
mdxCopy {/* vale Style.Redundancy = NO */} This is some text ACT test {/* vale Style.Redundancy = YES */}
Turn off specific match(es) within a rule:
mdxCopy {/* vale Style.Redundancy["ACT test","OTHER"] = NO */} This is some text ACT test {/* vale Style.Redundancy["ACT test","OTHER"] = YES */}
Turn on or off specific styles:
mdxCopy {/* vale StyleName1 = YES */} {/* vale StyleName2 = NO */}
Set styles (enabling them and switching off any other styles):
mdxCopy {/* vale style = StyleName1 */} {/* vale styles = StyleName1, StyleName2 */}
On This Page