diff options
-rw-r--r-- | Makefile | 30 |
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 |