diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 90c98b6f..93393475 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,11 +75,9 @@ Pages all live in the `docs/pages` sub-directory, and are written in markdown. To build the webpage locally (for testing) 1. [Install jekyll] -2. Run `bundle install` from the `docs/` directory of this repository to - install dependencies. -3. Run `bundle exec jekyll serve` from the root directory of this repository. - This should fire up a local web server and tell you its address. By default - the server will automatically refresh the HTML pages if any changes are made +2. Run `make serve` from the `docs/` directory of this repository to + install dependencies and start a local web server. + The server will automatically refresh the HTML pages if any changes are made to the markdown sources. See the [jekyll docs] for more info. diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..930f9095 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,24 @@ +SHELL := /bin/bash +.PHONY: help serve build install clean check + +help: ## Show this help + @echo + @grep -E '^[a-zA-Z_0-9-]+:.*?## .*$$' $(MAKEFILE_LIST) \ + | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%s\033[0m|%s\n", $$1, $$2}' \ + | column -t -s '|' + @echo + +serve: install ## Start a local server and serve the site + bundle exec jekyll serve + +build: install ## Build the site + bundle exec jekyll build + +install: check ## Pull all jekyll dependencies + bundle install + +clean: ## Remove build files + rm -rf _site + +check: ## Check ruby (bundle) is installed + @command -v bundle &> /dev/null || { echo >&2 "Please install ruby >= 2.7 to use Jekyll"; exit 1; }