forked from neff/neff-steindesign.de
43 lines
1.0 KiB
Makefile
43 lines
1.0 KiB
Makefile
THEME = neff
|
|
REMOTE = dev.test:/var/www/neff-steindesign.dev.test
|
|
|
|
HUGO = /usr/bin/hugo
|
|
NPM = /usr/bin/npm
|
|
RSYNC = /usr/bin/rsync
|
|
JPEGOPTIM = /usr/bin/jpegoptim
|
|
OPTIPNG = /usr/bin/optipng
|
|
|
|
.PHONY: all clean server jpegoptim optipng site staging theme
|
|
.SUFFIXES: .jpg .png .md .html .js .css .scss .toml
|
|
|
|
DIRS = content data static themes/$(THEME) resources
|
|
|
|
all: $(DIRS) public/*
|
|
|
|
clean:
|
|
rm -rf public/ resources/
|
|
|
|
theme:
|
|
$(NPM) --prefix="themes/$(THEME)" install --save-dev
|
|
$(NPM) --prefix="themes/$(THEME)" run build
|
|
|
|
site:
|
|
$(HUGO) --gc
|
|
|
|
staging:
|
|
$(HUGO) --buildDrafts --buildExpired --buildFuture --gc
|
|
|
|
server: themes/$(THEME)/package-lock.json themes/$(THEME)/src
|
|
$(HUGO) server --buildDrafts --buildExpired --buildFuture --gc
|
|
|
|
$(DIRS): themes/$(THEME)/package-lock.json themes/$(THEME)/src
|
|
$(HUGO) --gc
|
|
|
|
themes/$(THEME)/package-lock.json:
|
|
$(NPM) --prefix="themes/$(THEME)" install --save-dev
|
|
|
|
themes/$(THEME)/src:
|
|
$(NPM) --prefix="themes/$(THEME)" run build
|
|
|
|
public/*:
|
|
$(RSYNC) -avz --delete public/ $(REMOTE)
|