Made make serve reachable when developing on a remote server
This commit is contained in:
parent
2e3d640230
commit
3b1e0cb5bb
1 changed files with 2 additions and 1 deletions
3
Makefile
3
Makefile
|
@ -1,5 +1,6 @@
|
||||||
CACHEDIR=/tmp/hugo-cache-$(USER)
|
CACHEDIR=/tmp/hugo-cache-$(USER)
|
||||||
DESTDIR=public/
|
DESTDIR=public/
|
||||||
|
HOSTNAME=$(shell hostname)
|
||||||
|
|
||||||
.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)
|
||||||
|
@ -17,7 +18,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 --cacheDir $(CACHEDIR)
|
hugo serve --disableFastRender --noHTTPCache --cacheDir $(CACHEDIR) --bind 0.0.0.0 --port 1313 -b http://$(HOSTNAME):1313/
|
||||||
|
|
||||||
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