summaryrefslogtreecommitdiff
path: root/Makefile
blob: dc2ae1c9f389e6d9a9338fcb3423e613a7dea272 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
PNGS=$(shell find static -name "*.png")
JPGS=$(shell find static -name "*.jpg")

PNG2WEBP := $(patsubst %.png,%.webp,$(PNGS))
JPG2WEBP := $(patsubst %.jpg,%.webp,$(JPGS))

images: $(PNG2WEBP) $(JPG2WEBP)

%.webp: %.png
	cwebp -q 100 "$<" -o "$@"

%.webp: %.jpg
	cwebp -q 100 "$<" -o "$@"

build: clean
	bundle exec jekyll build

clean:
	rm -rf _site

server: clean
	bundle exec jekyll server --port 3001 --watch --drafts

publish: build images
	rsync -chavzOP --stats _site/ 104.236.175.223:/srv/www/lumberjaph.net/

deps:
	bundle install --path vendor/bundle