From 9b08ffc74c1ac4f469189c621011def45203bc25 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 11 Mar 2021 21:36:59 +0100 Subject: Fixed hugo cache directory path that can easily conflict on a server with multiple users --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Makefile') 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}' -- cgit v1.2.3