forked from neff/neff-steindesign.de
add local target to makefile
This commit is contained in:
parent
6bfa13b5e9
commit
f970a659ba
13
Makefile
13
Makefile
|
|
@ -1,4 +1,6 @@
|
|||
THEME = neff
|
||||
LOCAL_DIR = /srv/http/staging
|
||||
REMOTE_DIR = /srv/http/live
|
||||
REMOTE = dev.test:/var/www/neff-steindesign.dev.test
|
||||
|
||||
HUGO = /usr/bin/hugo
|
||||
|
|
@ -7,11 +9,15 @@ RSYNC = /usr/bin/rsync
|
|||
JPEGOPTIM = /usr/bin/jpegoptim
|
||||
OPTIPNG = /usr/bin/optipng
|
||||
|
||||
.PHONY: all clean server jpegoptim optipng site staging theme
|
||||
.PHONY: all clean server jpegoptim optipng site staging theme local
|
||||
.SUFFIXES: .jpg .png .md .html .js .css .scss .toml
|
||||
|
||||
DIRS = content data static themes/$(THEME) resources
|
||||
|
||||
HUGO_ARGS = --gc --minify
|
||||
|
||||
IP := $(shell hostname --ip-address)
|
||||
|
||||
all: $(DIRS) public/*
|
||||
|
||||
clean:
|
||||
|
|
@ -22,7 +28,10 @@ theme:
|
|||
$(NPM) --prefix="themes/$(THEME)" run build
|
||||
|
||||
site:
|
||||
$(HUGO) --gc
|
||||
$(HUGO) $(HUGO_ARGS) --destination $(REMOTE_DIR)
|
||||
|
||||
local:
|
||||
$(HUGO) $(HUGO_ARGS) --baseURL http://$(IP) --destination $(LOCAL_DIR)
|
||||
|
||||
staging:
|
||||
$(HUGO) --buildDrafts --buildExpired --buildFuture --gc
|
||||
|
|
|
|||
Loading…
Reference in New Issue