git: 163f29fb33 - main - Add support to Hugo arguments/flags

"Danilo G. Baio" <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by dbaio:

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

commit 163f29fb33bf5cd8101635f5c7cddfcc04a0d28d
Author:     Danilo G. Baio <[email protected]>
AuthorDate: 2021-06-05 17:25:34 +0000
Commit:     Danilo G. Baio <[email protected]>
CommitDate: 2021-06-05 17:25:34 +0000

    Add support to Hugo arguments/flags
    
    This also enables verbose output by default, same behavior we had in the
    doc tree before Hugo/Asciidoctor and add --minify to HUGO_ARGS variable
    to make it optional.
    
    Reviewed by:    ceri, allanjude, imp
    Differential Revision:  https://reviews.freebsd.org/D30652
---
 documentation/Makefile | 5 +++--
 website/Makefile       | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/documentation/Makefile b/documentation/Makefile
index a10461f4ae..606d79c30f 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -21,6 +21,7 @@ LOCALBASE?=	/usr/local
 PYTHON_CMD =	${LOCALBASE}/bin/python3
 RUBY_CMD =	${LOCALBASE}/bin/ruby
 HUGO_CMD =	${LOCALBASE}/bin/hugo
+HUGO_ARGS?=	--verbose --minify
 ASCIIDOCTORPDF_CMD=	${LOCALBASE}/bin/asciidoctor-pdf
 .if defined(DOC_LANG) && !empty(DOC_LANG)
 LANGUAGES =	${DOC_LANG}
@@ -78,10 +79,10 @@ static/pgpkeys/pgpkeys.txt: static/pgpkeys/*key
 	${RUBY_CMD} ./tools/global-pgpkeys-creator.rb
 
 run-local: .PHONY
-	${HUGO_CMD} server -D $(BIND:D--bind=$(BIND)) --baseURL="http://$(.HOST):1313"
+	${HUGO_CMD} server ${HUGO_ARGS} -D $(BIND:D--bind=$(BIND)) --baseURL="http://$(.HOST):1313"
 
 build: .PHONY
-	${HUGO_CMD} --minify
+	${HUGO_CMD} ${HUGO_ARGS}
 
 #
 # PDF targets
diff --git a/website/Makefile b/website/Makefile
index 560c7b8d45..fbee771541 100644
--- a/website/Makefile
+++ b/website/Makefile
@@ -17,6 +17,7 @@ [email protected]
 
 PYTHON_CMD =	/usr/local/bin/python3
 HUGO_CMD =	/usr/local/bin/hugo
+HUGO_ARGS?=	--verbose
 RUBYLIB =	../shared/lib
 .export	RUBYLIB
 
@@ -51,10 +52,10 @@ generate-releases: .PHONY
 	${PYTHON_CMD} ./tools/releases-toml.py -p ./shared/releases.adoc
 
 run-local: .PHONY
-	${HUGO_CMD} server -D $(BIND:D--bind=$(BIND)) --baseURL="http://$(.HOST):1313"
+	${HUGO_CMD} server ${HUGO_ARGS} -D $(BIND:D--bind=$(BIND)) --baseURL="http://$(.HOST):1313"
 
 build: .PHONY
-	${HUGO_CMD}
+	${HUGO_CMD} ${HUGO_ARGS}
 
 post-build: cgi-permissions
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-doc-all
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.