Vale is an open-source command-line tool (CLI) that checks your content for errors and can surface issues through your IDE’s terminal (via the Problems tab) or inline alongside your content. It’s a great way to ensure your content is consistent and follows your project’s style guide. It’s also easy to use with other contributors to your documentation site.
Before you start #
Vale must be configured with a .vale.ini file and tailored to your specific project’s needs. In this guide, I’ll show you how to configure Vale to work for a Hugo-based documentation site that follows the Microsoft style guide. Feel free to swap out the packages I’ve selected for your own project’s needs.
How to add Vale to your documentation repository #
.vale.ini file is already provided and you just need to install and run Vale.Install Vale.
shbrew install valeNavigate to the root of your documentation repo.
Create a
.vale.inifile.Provide the following initial settings.
tomlStylesPath = styles MinAlertLevel = error # suggestion, warning, error Packages = Microsoft, write-good, Hugo Vocab = milo-docs [*.{md,txt}] BasedOnStyles = Vale, Microsoft, write-good # Blockignores =Run Vale.
shvale syncReview Vale errors in your content.
Other contributors to your documentation can install Vale and run vale sync in their local environment to check their content for errors.