git: c9c4fc4628 - main - hugo server: Fix bind and hostname parameters

Danilo G. Baio dbaio at FreeBSD.org
Tue Jun 8 22:55:03 UTC 2021


The branch main has been updated by dbaio:

URL: https://cgit.FreeBSD.org/doc/commit/?id=c9c4fc4628a0d18d41fffb66a7f930f81653ef6b

commit c9c4fc4628a0d18d41fffb66a7f930f81653ef6b
Author:     Danilo G. Baio <dbaio at FreeBSD.org>
AuthorDate: 2021-06-05 20:25:46 +0000
Commit:     Danilo G. Baio <dbaio at FreeBSD.org>
CommitDate: 2021-06-08 22:52:50 +0000

    hugo server: Fix bind and hostname parameters
    
    When BIND variable is defined, baseURL/.HOST should not be set to
    localhost by default.
    
    Reported by:    imp
    Reviewed by:    imp, ceri, blackend
    Differential Revision: https://reviews.freebsd.org/D30656
---
 documentation/Makefile | 8 ++++++--
 website/Makefile       | 8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/documentation/Makefile b/documentation/Makefile
index 606d79c30f..0c4725d19e 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -39,9 +39,13 @@ RUN_DEPENDS=	${PYTHON_CMD} \
 		${LOCALBASE}/bin/rougify
 
 .ifndef HOSTNAME
-.HOST+=localhost
+.  ifdef BIND
+.HOST=$(BIND)
+.  else
+.HOST=localhost
+.  endif
 .else
-.HOST+=$(HOSTNAME)
+.HOST=$(HOSTNAME)
 .endif
 
 .ORDER: all run
diff --git a/website/Makefile b/website/Makefile
index fbee771541..dd650f501a 100644
--- a/website/Makefile
+++ b/website/Makefile
@@ -22,9 +22,13 @@ RUBYLIB =	../shared/lib
 .export	RUBYLIB
 
 .ifndef HOSTNAME
-.HOST+=localhost
+.  ifdef BIND
+.HOST=$(BIND)
+.  else
+.HOST=localhost
+.  endif
 .else
-.HOST+=$(HOSTNAME)
+.HOST=$(HOSTNAME)
 .endif
 
 .ORDER: all run


More information about the dev-commits-doc-all mailing list