-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
32 lines (25 loc) · 962 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.DEFAULT_GOAL := help
# SERVER_DEST is defined in a `.env` file and follow this format: [email protected]:/path/to/website
include .env
.PHONY: boop
boop: ## Build the website with Boop! generator
boop.py --development
rsync -P -rvzc --delete ./_site/ $(LOCAL_DEST)
.PHONY: clean
clean: ## Clean site files
rm -rf ./_site ./_cache
.PHONY: publish
publish: clean ## Publish the website online (rsync)
boop.py
rsync -P -rvzc --delete ./_site/ $(SERVER_DEST)
curl -d "hub.mode=publish&hub.topic=https://flus.fr/carnet/feeds/all.atom.xml" -X POST https://websub.flus.io/
rm -rf ./_cache
.PHONY: open
open: boop ## Open the built site in a web browser
xdg-open http://localhost:8000/carnet/
.PHONY: tree
tree: ## Display the structure of the website
tree -I '_site|_cache' --dirsfirst -CA
.PHONY: help
help:
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'