This repository provides a standardized, bootstrap-able workflow for linting documentation using Vale. Its purpose is to make it easy to add this workflow to any project with a single command.
Running the bootstrap script will add the following to your project:
- GitHub Actions Workflow: A
.github/workflows/docs.yamlfile that automatically runs Vale on every pull request. - Vale Configuration: A
.vale.inifile pre-configured to use our central Platform Engineering Vale package, which inherits from the company-wide style guide. - Local Vocabulary: A
.vale/vocab/Base/accept.txtfile for adding project-specific accepted words. - Makefile Targets: A standardized
MakefileandMakefile.docsfor running checks and managing the Vale environment locally. - .gitignore Rules: An intelligent set of rules to keep your repository clean by ignoring downloaded Vale packages.
To add this Vale workflow to an existing project, navigate to the root directory of that project and run the following command in your terminal.
Prerequisites:
- You must be in a Git repository.
- You must be on a feature branch (not
main).
bash <(curl -sSL https://raw.githubusercontent.com/srbouffard/vale-workflow-template/main/bootstrap.sh)The script is interactive and will guide you through the setup process.
The bootstrap.sh script is designed to be safe and intelligent:
- ✅ Interactive Prompts: It asks for confirmation before making potentially destructive changes.
- Makefile Handling: If a
Makefilealready exists, it will ask you whether to overwrite it, or save the new targets toMakefile.tmpfor you to merge manually. - Wordlist Migration: It can automatically detect an old
.custom_wordlist.txtfile and migrate its contents for you. - Idempotent: The script can be run multiple times. It will intelligently update the
.gitignoreblock without creating duplicate entries.
To update the workflow for all projects, simply modify the files in this repository and commit your changes. The next time a team member runs the bootstrap script in a project, it will pull down the latest versions of the files.