diff --git a/documentation/Makefile b/documentation/Makefile index 57472063dd..3b5c1cfd65 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -19,6 +19,12 @@ PYTHON_CMD = /usr/local/bin/python3.7 HUGO_CMD = /usr/local/bin/hugo LANGUAGES = en,es,pt-br,de,ja,zh-cn,zh-tw,ru,el,hu,it,mn,nl,pl,fr +.ifndef HOSTNAME +.HOST+=localhost +.else +.HOST+=$(HOSTNAME) +.endif + .ORDER: all run .ORDER: starting-message generate-books-toc @@ -41,7 +47,7 @@ generate-books-toc: .PHONY ${PYTHON_CMD} ./tools/books-toc-examples-creator.py -l ${LANGUAGES} run-local: .PHONY - ${HUGO_CMD} server -D + ${HUGO_CMD} server -D --baseURL="http://$(.HOST):1313" build: .PHONY ${HUGO_CMD} --minify diff --git a/website/Makefile b/website/Makefile index 6337692942..2294db8838 100644 --- a/website/Makefile +++ b/website/Makefile @@ -18,6 +18,12 @@ MAINTAINER=carlavilla@FreeBSD.org PYTHON_CMD = /usr/local/bin/python3.7 HUGO_CMD = /usr/local/bin/hugo +.ifndef HOSTNAME +.HOST+=localhost +.else +.HOST+=$(HOSTNAME) +.endif + .ORDER: all run .ORDER: starting-message generate-releases @@ -36,7 +42,7 @@ generate-releases: .PHONY ${PYTHON_CMD} ./tools/releases-toml.py -p ./shared/releases.adoc run-local: .PHONY - ${HUGO_CMD} server -D + ${HUGO_CMD} server -D --baseURL="http://$(.HOST):1313" build: .PHONY ${HUGO_CMD}