2024-05-26 23:31:33 +02:00
|
|
|
# $< : first dependency (input)
|
|
|
|
# $@ : rule name (output)
|
|
|
|
|
2024-05-22 15:40:30 +02:00
|
|
|
# Build the website
|
2024-05-26 23:31:33 +02:00
|
|
|
site/index.html: docs/** theme/** theme/main.html theme/style.css.min mkdocs.yml
|
2024-05-26 19:25:36 +02:00
|
|
|
mkdocs build
|
2024-05-22 15:40:30 +02:00
|
|
|
|
2024-05-26 20:10:32 +02:00
|
|
|
theme/main.html: haml/main.haml
|
|
|
|
haml render $< > $@.tmp
|
|
|
|
cat $@.tmp > $@
|
|
|
|
rm $@.tmp
|
|
|
|
|
2024-05-26 23:31:33 +02:00
|
|
|
theme/style.css.min: theme/style.css
|
|
|
|
python3 -m csscompressor -o $@ $<
|
|
|
|
|
2024-05-22 15:40:30 +02:00
|
|
|
# Serve the website at http://127.0.0.1:8000/~tasiaiso/
|
2024-05-26 20:10:32 +02:00
|
|
|
serve: theme/main.html
|
2024-05-22 15:40:30 +02:00
|
|
|
mkdocs serve -w theme
|
|
|
|
|
|
|
|
format: format-code format-markdown
|
|
|
|
|
|
|
|
format-code:
|
|
|
|
npx prettier --cache --write --check .
|
|
|
|
|
|
|
|
format-markdown:
|
|
|
|
npx markdownlint-cli 'docs/**/*.md' -f
|
|
|
|
|
2024-05-26 22:43:04 +02:00
|
|
|
# Upload the website to tilde.club
|
2024-05-26 22:43:53 +02:00
|
|
|
upload: site/index.html
|
2024-05-22 15:40:30 +02:00
|
|
|
scp -r site/** tasiaiso@tilde.club:/home/tasiaiso/public_html
|
|
|
|
|
2024-05-26 23:31:33 +02:00
|
|
|
purge: clean format site/index.html
|
|
|
|
|
2024-05-22 15:40:30 +02:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -r site/
|
2024-05-26 23:31:33 +02:00
|
|
|
rm theme/main.html
|
|
|
|
rm theme/style.css.min
|