Fixed hugo cache directory path that can easily conflict on a server with multiple users
This commit is contained in:
parent
d75aafd952
commit
9b08ffc74c
1 changed files with 3 additions and 3 deletions
6
Makefile
6
Makefile
|
@ -1,10 +1,10 @@
|
||||||
.POSIX:
|
CACHEDIR=/tmp/hugo-cache-$(USER)
|
||||||
DESTDIR=public/
|
DESTDIR=public/
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: ## make build # builds an optimized version of the website in $(DESTDIR)
|
build: ## make build # builds an optimized version of the website in $(DESTDIR)
|
||||||
@echo "----- Generating site -----"
|
@echo "----- Generating site -----"
|
||||||
hugo --gc --minify --cleanDestinationDir -d $(DESTDIR)
|
hugo --gc --minify --cleanDestinationDir -d $(DESTDIR) --cacheDir $(CACHEDIR)
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
@ -14,7 +14,7 @@ clean: ## make clean # removed all $(DESTDIR) contents
|
||||||
|
|
||||||
.PHONY: serve
|
.PHONY: serve
|
||||||
serve: ## make serve # hugo web server development mode
|
serve: ## make serve # hugo web server development mode
|
||||||
hugo serve --disableFastRender --noHTTPCache
|
hugo serve --disableFastRender --noHTTPCache --cacheDir $(CACHEDIR)
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
Loading…
Add table
Reference in a new issue