From b1a9b1b9b2f04efd6dc39bd2a02c544d34d1259c Mon Sep 17 00:00:00 2001 From: Prefetch Date: Sun, 1 Jan 2023 16:40:56 +0100 Subject: Change license, add Makefile, add image caching control --- Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..05af8fe --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +.PHONY: serve build compress deploy clean + + +serve: + EXECJS_RUNTIME=MiniRacer bundle exec jekyll serve --livereload --incremental + + +build: + EXECJS_RUNTIME=MiniRacer JEKYLL_ENV=production bundle exec jekyll build + + +FINDARGS1 = -name "*.html" -o -name "*.xml" -o -name "*.css" -o -name "*.js" +FINDARGS2 = -name "*.svg" -o -name "*.webmanifest" -o -name "*.ico" -o -name "*.txt" +compress: + for f in `find public/ -type f $(FINDARGS1) -o $(FINDARGS2)`; do \ + echo "Compressing $$f..." ; \ + gzip --keep --force -9 $$f ; \ + brotli --keep --force -Z $$f ; \ + done + + +deploy: + rsync --rsh="ssh -p $(PORT)" --stats --checksum --recursive public/ $(HOST):/srv/prefetch.eu/public/ + + +clean: + rm -rf public/* + rm -rf source/.jekyll-cache/* -- cgit v1.2.3