-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (32 loc) · 891 Bytes
/
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
.SILENT:
.DEFAULT_GOAL := help
.PHONY: help
help:
$(info github-page-maker:)
$(info -> new Creates a new Hugo project)
$(info -> add theme=[repository-url] Adds Hugo theme as a submodule)
$(info -> update Updates included themes)
$(info -> run Serves website at http://localhost:1313/)
$(info -> build Builds deployable version)
$(info -> publish Pushes changes to repository)
.PHONY: new
new:
hugo new site .hugo
.PHONY: add
add:
cd .hugo/themes && git submodule add $(theme)
.PHONY: update
update:
git submodule sync --recursive
git submodule update --init --recursive
.PHONY: run
run:
cd .hugo && hugo server
.PHONY: build
build:
cd .hugo && hugo -d ..
.PHONY: publish
publish:
git add .
git commit -m "Publishing github-page-maker changes."
git push