diff options
author | Prefetch | 2023-01-01 16:40:56 +0100 |
---|---|---|
committer | Prefetch | 2023-01-01 17:02:29 +0100 |
commit | b1a9b1b9b2f04efd6dc39bd2a02c544d34d1259c (patch) | |
tree | 1fd87919deee17e58f8ad19c09abd54bd4a70886 /Makefile | |
parent | 1d700ab734aa9b6711eb31796beb25cb7659d8e0 (diff) |
Change license, add Makefile, add image caching control
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 28 |
1 files changed, 28 insertions, 0 deletions
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/* |