-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 852 Bytes
/
Makefile
File metadata and controls
34 lines (25 loc) · 852 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
.PHONY: help serve build new clean submodules docker-serve docker-build
TITLE ?= new-post
help:
@echo "Usage:"
@echo " make serve - Start Hugo dev server (with drafts)"
@echo " make build - Build site for production"
@echo " make new TITLE=... - Create a new post"
@echo " make clean - Remove build artifacts"
@echo " make submodules - Init/update git submodules (theme)"
@echo " make docker-serve - Start Hugo dev server via Docker (no local Hugo needed)"
@echo " make docker-build - Build site for production via Docker"
serve:
hugo server -D
build:
hugo --gc --minify
new:
hugo new posts/$(TITLE).md
clean:
rm -rf public resources/_gen
submodules:
git submodule update --init --recursive
docker-serve:
docker compose up
docker-build:
docker compose run --rm hugo hugo --gc --minify