blob: 0465a3ec7944b565e14820c229efba1c0c0a2665 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
CACHEDIR=/tmp/hugo-cache-$(USER)
DESTDIR=public/
.PHONY: build
build: ## make build # builds an optimized version of the website in $(DESTDIR)
@echo "----- Generating site -----"
hugo --gc --minify --cleanDestinationDir -d $(DESTDIR) --cacheDir $(CACHEDIR)
.PHONY: clean
clean: ## make clean # removed all $(DESTDIR) contents
@echo "----- Cleaning old build -----"
cd $(DESTDIR) && rm -rf *
.PHONY: serve
serve: ## make serve # hugo web server development mode
hugo serve --disableFastRender --noHTTPCache --cacheDir $(CACHEDIR)
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help
|