Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (25 sloc) 530 Bytes
.PHONY: deploy build server public clean new
HUGO := hugo
PREFIX := $(shell date +post/%Y-%m-%d)
IMGDIR := $(shell date +static/%Y/%m/%d)
deploy: build
gcloud app deploy
build: clean
$(HUGO)
server:
$(HUGO) server -vD
public: clean
$(HUGO) --baseURL http://127.0.0.1:8080/
go run main.go
clean:
@-rm -rf public/
@-find static -type d -empty | xargs rmdir
new:
@: dummy
.DEFAULT:
@case $(firstword $(MAKECMDGOALS)) in \
new) \
mkdir -p $(IMGDIR)/$@; \
$(HUGO) new $(PREFIX)-$@.md --editor vim; \
;; \
esac
You can’t perform that action at this time.