about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-09-16 15:38:08 +0200
committerAlan Pearce2023-09-16 15:38:08 +0200
commitd484c4b09faf96a4717b0dec89f397d5119e600e (patch)
tree861e0bc2bddf931ad47307488df48c5b1efb197d
parent69603c41527237d2404569b41e110da6633f592f (diff)
downloadwebsite-d484c4b09faf96a4717b0dec89f397d5119e600e.tar.lz
website-d484c4b09faf96a4717b0dec89f397d5119e600e.tar.zst
website-d484c4b09faf96a4717b0dec89f397d5119e600e.zip
Use make only for necessary functionality
-rw-r--r--Makefile30
1 files changed, 8 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index d40c117..ff564f0 100644
--- a/Makefile
+++ b/Makefile
@@ -2,38 +2,30 @@
 .ONESHELL:
 .DELETE_ON_ERROR:
 
-PREFIX ?= public
-
-md_files := $(shell fd . content --type=file -e md)
 brotli := @brotli --force --no-copy-stat
 gzip := @gzip --best --keep --force
 zstd := @zstd --force --no-pass-through -19 --quiet --stdout
 pr   := @printf "%4s %s\n"
 
-build: $(PREFIX)/index.html
-
-$(PREFIX)/index.html: config.toml $(md_files)
-	zola build --force --output-dir $(PREFIX)
-
-$(PREFIX)/feed-styles.xsl: $(PREFIX)/index.html
-	mv $(PREFIX)/feed-styles/index.html $@
-	rm -fr $(PREFIX)/feed-styles
+public/feed-styles.xsl: public/index.html
+	@mv public/feed-styles/index.html $@
+	@rm -fr public/feed-styles
 
-postprocess: $(PREFIX)/feed-styles.xsl
+postprocess: public/feed-styles.xsl
 	touch .postprocessstamp
 
 format: .formatstamp
 
-.formatstamp: $(PREFIX)/index.html .postprocessstamp
+.formatstamp: public/index.html .postprocessstamp
 	@echo "Formatting HTML..."
-	@prettier --write --parser html --print-width 200 "$(PREFIX)/**/*.html" > /dev/null
+	@prettier --write --parser html --print-width 200 "public/**/*.html" > /dev/null
 	@touch .formatstamp
 
 clean:
-	rm -rf ./$(PREFIX)
+	rm -rf ./public
 	rm -rf ./.*stamp
 
-to_compress := $(shell fd . $(PREFIX) --type=file -e html -e xml -e txt -e asc)
+to_compress := $(shell fd . public --type=file -e html -e xml -e txt -e asc)
 brotli_files := $(patsubst %, %.br, $(to_compress))
 gzip_files := $(patsubst %, %.gz, $(to_compress))
 zstd_files := $(patsubst %, %.zst, $(to_compress))
@@ -91,10 +83,4 @@ compress: .compressstamp
 	@echo "Compressing output files..."
 	@touch .compressstamp
 
-deploy: .deploystamp
-
-.deploystamp: .compressstamp Caddyfile redis.Caddyfile Dockerfile fly.toml
-	fly deploy
-	@touch .deploystamp
-
 .PHONY: all clean build format compress deploy