2024-01-10 14:23:56 +00:00
|
|
|
BUILD_DIR := ./public
|
2024-01-04 11:49:18 +00:00
|
|
|
SRCS := src/build.py src/index.html src/index.md src/assets/theme.css
|
|
|
|
|
|
|
|
.PHONY: all clean publish serve
|
|
|
|
|
|
|
|
site.tgz: $(SRCS)
|
|
|
|
mkdir -p $(BUILD_DIR)
|
|
|
|
python3 src/build.py > $(BUILD_DIR)/index.html
|
|
|
|
cp -r src/assets $(BUILD_DIR)
|
|
|
|
cd $(BUILD_DIR) && tar -cvzf ../site.tgz .
|
|
|
|
|
|
|
|
publish: site.tgz
|
|
|
|
hut pages publish -d peio.scryk.net site.tgz
|
|
|
|
|
|
|
|
serve: site.tgz
|
|
|
|
cd $(BUILD_DIR) && python3 -m http.server
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(BUILD_DIR)
|
|
|
|
rm site.tgz
|
|
|
|
|
|
|
|
all: site.tgz
|