aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJulien Dessaux2021-03-11 21:36:59 +0100
committerJulien Dessaux2021-03-11 21:39:40 +0100
commit9b08ffc74c1ac4f469189c621011def45203bc25 (patch)
treef31632dec9873e5c4323b4ec6e12c3b8bf8f205f /Makefile
parentSome more articles reformatting (diff)
downloadwww-9b08ffc74c1ac4f469189c621011def45203bc25.tar.gz
www-9b08ffc74c1ac4f469189c621011def45203bc25.tar.bz2
www-9b08ffc74c1ac4f469189c621011def45203bc25.zip
Fixed hugo cache directory path that can easily conflict on a server with multiple users
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 104306b..fd60023 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,10 @@
-.POSIX:
+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)
+ hugo --gc --minify --cleanDestinationDir -d $(DESTDIR) --cacheDir $(CACHEDIR)
.PHONY: clean
@@ -14,7 +14,7 @@ clean: ## make clean # removed all $(DESTDIR) contents
.PHONY: serve
serve: ## make serve # hugo web server development mode
- hugo serve --disableFastRender --noHTTPCache
+ 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}'