diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2ce05f85a89..9e8fe771a33 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -103,6 +103,21 @@ $ docker buildx bake validate If this command doesn't result in any errors, you're good to go! +#### Running Vale + +Vale is a tool that checks for spelling and grammar errors in your text. To run Vale +for the content in the `content` directory, use the following command: + +```console +$ make vale +``` + +You can also specify a different directory for Vale to check. For example: + +```console +$ CONTENT_DIR="content/manuals/compose" make vale +``` + ## Content not edited here CLI reference documentation is maintained in upstream repositories. It's diff --git a/Makefile b/Makefile index 8a5b14de683..8d9a7eaa35e 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,18 @@ +# Directory containing the content to validate. Default is "content". +# It can be overridden by setting the CONTENT_DIR environment variable. +# Example: CONTENT_DIR=content/manuals/compose make vale +CONTENT_DIR := $(or $(CONTENT_DIR), content) + +# Docker image to use for vale. +VALE_IMAGE := jdkato/vale:latest + +.PHONY: vale +vale: ## run vale + docker run --rm -v $(PWD):/docs \ + -w /docs \ + -e PIP_BREAK_SYSTEM_PACKAGES=1 \ + $(VALE_IMAGE) $(CONTENT_DIR) + .PHONY: vendor vendor: ## vendor hugo modules ./hack/vendor