-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
43 lines (33 loc) · 1.07 KB
/
makefile
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Based on https://github.com/bphenriques/knowledge-base/blob/master/Makefile
BASE_DIR := $(shell pwd)
EMACS_BUILD_SRC := $(BASE_DIR)/emacs
BASE_URL := https://curiouscoding.nl
# all: clean build-content open serve
all: open serve
.PHONY: clean
clean:
git clean -X --force content
rm -rf public
rm -rf static/ox-hugo
.PHONY: serve
serve:
hugo server --minify --disableFastRender --navigateToChanged --baseURL localhost:1313
.PHONY: open
open:
open http://localhost:1313
.PHONY: build-content
build-content:
git clean -X --force content
# Build temporary minimal EMACS installation separate from the one in the machine.
XDG_CONFIG_HOME= HOME=$(EMACS_BUILD_SRC) BASE_DIR=$(BASE_DIR) emacs -Q --batch --load $(EMACS_BUILD_SRC)/init.el --execute "(build/export-all)" --kill
.PHONY: build-site
build-site:
rm -rf public/*
hugo --minify --cleanDestinationDir --baseURL $(BASE_URL)
.PHONY: build
build: build-content build-site
.PHONY: deploy
deploy: build-content build-site
update-sub-modules:
git submodule update --init --recursive
git submodule foreach git pull origin master