# $< : first dependency (input) # $@ : rule name (output) # Build the website site/index.html: docs/** theme/** theme/main.html theme/style.css.min mkdocs.yml mkdocs build theme/main.html: haml/main.haml haml render $< > $@.tmp cat $@.tmp > $@ rm $@.tmp theme/style.css.min: theme/style.css python3 -m csscompressor -o $@ $< # Serve the website at http://127.0.0.1:8000/~tasiaiso/ serve: theme/main.html mkdocs serve -w theme format: format-code format-markdown format-code: npx prettier --cache --write --check . format-markdown: npx markdownlint-cli 'docs/**/*.md' -f # Upload the website to tilde.club upload: site/index.html scp -r site/** tasiaiso@tilde.club:/home/tasiaiso/public_html purge: clean format site/index.html .PHONY: clean clean: rm -r site/ rm theme/main.html rm theme/style.css.min