Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SHELL:=/bin/bash
- BASEDIR=$(CURDIR)
- OUTPUTDIR=$(BASEDIR)/public
- optipng = find $(OUTPUTDIR) -name '*.png' -print0 | xargs -0 -P8 -n2 optipng -o5 -strip all -quiet
- optijpg = find $(OUTPUTDIR) -name '*.jpg' -print0 | xargs -0 -P8 -n2 jpegoptim --strip-all -m30 -q
- site:
- @echo "Deleting files from old publication"
- rm -rf $(OUTPUTDIR)/*
- @echo "Generating site"
- hugo
- @echo "Optimizing images"
- $(call optijpg)
- $(call optipng)
- @echo "Preparing commit"
- cd $(OUTPUTDIR)/ && git add . && git status && git commit -m "$(m)"
Add Comment
Please, Sign In to add comment