aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2021-10-14 09:10:08 +0200
committerJulien Dessaux2021-10-14 09:10:08 +0200
commit3b1e0cb5bb157c1db9df54693091ea5aff820a52 (patch)
treeaf2c616e7e6ca9c9c2ac04cd6b0ec0907af00f08
parenttypo (diff)
downloadwww-3b1e0cb5bb157c1db9df54693091ea5aff820a52.tar.gz
www-3b1e0cb5bb157c1db9df54693091ea5aff820a52.tar.bz2
www-3b1e0cb5bb157c1db9df54693091ea5aff820a52.zip
Made make serve reachable when developing on a remote server
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4aa77b3..9673f61 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
CACHEDIR=/tmp/hugo-cache-$(USER)
DESTDIR=public/
+HOSTNAME=$(shell hostname)
.PHONY: build
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
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:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'