about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-08-01 19:58:07 +0200
committerAlan Pearce2023-08-01 19:58:07 +0200
commit994fb96cf94676e400b44584249cf91314d778c4 (patch)
treee63893323034f236e2f8a7c3071bce59fb5b066b
parent0548b02666c8b1f1afce5f834c0c7ea682c77bcf (diff)
downloadwebsite-994fb96cf94676e400b44584249cf91314d778c4.tar.lz
website-994fb96cf94676e400b44584249cf91314d778c4.tar.zst
website-994fb96cf94676e400b44584249cf91314d778c4.zip
Fix html -> md dependencies
-rw-r--r--Makefile27
1 files changed, 14 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 53121cb..294b75e 100644
--- a/Makefile
+++ b/Makefile
@@ -4,13 +4,14 @@
 
 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
 
 build: $(PREFIX)/index.html
 
-$(PREFIX)/index.html: config.toml content/**.md static/** templates/** themes/**/*
+$(PREFIX)/index.html: config.toml $(md_files)
 	zola build --force --output-dir $(PREFIX)
 
 format: .formatstamp
@@ -28,40 +29,40 @@ brotli_files := $(patsubst %, %.br, $(to_compress))
 gzip_files := $(patsubst %, %.gz, $(to_compress))
 zstd_files := $(patsubst %, %.zst, $(to_compress))
 
-${PREFIX}/%.html.br: ${PREFIX}/%.html
+%.html.br: %.html
 	$(brotli) $<
 
-${PREFIX}/%.xml.br: ${PREFIX}/%.xml
+%.xml.br: %.xml
 	$(brotli) $<
 
-${PREFIX}/%.txt.br: ${PREFIX}/%.txt
+%.txt.br: %.txt
 	$(brotli) $<
 
-${PREFIX}/%.asc.br: ${PREFIX}/%.asc
+%.asc.br: %.asc
 	$(brotli) $<
 
-${PREFIX}/%.html.gz: ${PREFIX}/%.html
+%.html.gz: %.html
 	$(gzip) $<
 
-${PREFIX}/%.xml.gz: ${PREFIX}/%.xml
+%.xml.gz: %.xml
 	$(gzip) $<
 
-${PREFIX}/%.txt.gz: ${PREFIX}/%.txt
+%.txt.gz: %.txt
 	$(gzip) $<
 
-${PREFIX}/%.asc.gz: ${PREFIX}/%.asc
+%.asc.gz: %.asc
 	$(gzip) $<
 
-${PREFIX}/%.html.zst: ${PREFIX}/%.html
+%.html.zst: %.html
 	$(zstd) $< > $@
 
-${PREFIX}/%.xml.zst: ${PREFIX}/%.xml
+%.xml.zst: %.xml
 	$(zstd) $< > $@
 
-${PREFIX}/%.txt.zst: ${PREFIX}/%.txt
+%.txt.zst: %.txt
 	$(zstd) $< > $@
 
-${PREFIX}/%.asc.zst: ${PREFIX}/%.asc
+%.asc.zst: %.asc
 	$(zstd) $< > $@
 
 compress: .compressstamp