-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (31 loc) · 758 Bytes
/
Makefile
File metadata and controls
43 lines (31 loc) · 758 Bytes
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
notify ?= notify-send
open ?= xdg-open
all: build
build:
yarn install
stack build
stack exec site build
clean:
stack exec site clean
watch:
watchexec --exts hs --restart -- $(MAKE) watch/build
watch/build:
$(MAKE) build && $(notify) 'success' || $(notify) 'failure'
stack exec site watch
serve:
stack exec site watch
start: open watch
open:
$(open) 'http://127.0.0.1:25252'
browse:
$(open) https://aiya000.github.io
POST_NAME := $$(date +'%Y-%m-%d')-$(name)
# make post name=me
post:
mkdir "./images/posts/$(POST_NAME)"
echo --- > "./posts/$(POST_NAME).md"
echo 'title: ' >> "./posts/$(POST_NAME).md"
echo 'tags: ' >> "./posts/$(POST_NAME).md"
echo --- >> "./posts/$(POST_NAME).md"
deploy: build
./scripts/deploy.hs