1
0
Fork 0
www/Makefile

28 lines
944 B
Makefile
Raw Normal View History

2023-09-11 22:38:24 +00:00
.PHONY: *
2024-06-25 20:34:32 +00:00
help: ## display this help
@awk 'BEGIN{FS = ":.*##"; printf "\033[1m\nUsage\n \033[1;92m make\033[0;36m <target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } ' $(MAKEFILE_LIST)
build: ## compile src/ into out/ with pagefind
./build.py out/
2023-09-17 05:01:01 +00:00
pagefind --site out/
2024-06-25 20:34:32 +00:00
clean: ## delete out/ and src/
2023-09-20 04:29:41 +00:00
test -e out && rm -rf out || true
test -e srv && rm -rf srv || true
2023-09-11 22:38:24 +00:00
2024-06-25 20:34:32 +00:00
watch: ## rebuild on changes
2023-09-20 03:32:45 +00:00
while inotifywait -r -e modify -e move -e create -e delete build.py Makefile src/; do make build; done
2023-09-11 22:38:24 +00:00
2024-06-25 20:34:32 +00:00
serve: ## serve out/
2023-09-11 22:38:24 +00:00
python -m http.server --directory out/
2023-09-12 03:07:12 +00:00
2024-06-25 20:34:32 +00:00
pubdate: ## Replace "pubdate: now" with the current date
2023-09-28 22:39:09 +00:00
sed -i "s/pubdate: now/pubdate: $$(date -Isec)/" src/blog/**/*.md
2023-09-21 16:16:43 +00:00
2024-06-25 20:34:32 +00:00
upload: ## build to srv/ and upload to www.alogoulogoi.com
2024-01-24 06:08:27 +00:00
test -e srv && rm -rf srv || true
2023-09-20 04:29:41 +00:00
./build.py srv/
pagefind --site srv/
2024-02-05 03:44:46 +00:00
rsync -av --delete srv/ ssh.alogoulogoi.com:/srv/www.alogoulogoi.com