mirror of https://git.FreeBSD.org/doc.git
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
This commit is contained in:
parent
e89d34ab6a
commit
163f29fb33
|
@ -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
|
||||
|
|
|
@ -17,6 +17,7 @@ MAINTAINER=carlavilla@FreeBSD.org
|
|||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue