mirror of https://git.FreeBSD.org/doc.git
Allow building the documentation and the website with upstream hugo
When we build our documentation and website we use a hacked version of www/gohugo that allows for arbitrary asciidoc extensions. This was added as a patch in r562416. The suggested pull request[1] this patch was based on was not accepted "as is" and only allows the execution of extensions in Ruby's $LOAD_PATH. With these changes, we add our <docroot>shared/lib directory to Ruby's library directory so we can load our custom extensions. This also allows building the docs and website outsite FreeBSD using upstream and unmodified tools. Tested with the upcoming vanilla gohugo-0.82 provided by gohugo's maintainer. [1] https://github.com/gohugoio/hugo/pull/8131 Patch by: fernape@ Differential Revision: https://reviews.freebsd.org/D29410
This commit is contained in:
parent
037971c6d4
commit
284030c301
|
|
@ -18,6 +18,8 @@ MAINTAINER=carlavilla@FreeBSD.org
|
|||
PYTHON_CMD = /usr/local/bin/python3
|
||||
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
|
||||
RUBYLIB = ../shared/lib
|
||||
.export RUBYLIB
|
||||
|
||||
.ifndef HOSTNAME
|
||||
.HOST+=localhost
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ enableRobotsTXT = true
|
|||
|
||||
[markup.asciidocExt]
|
||||
preserveTOC = true
|
||||
extensions = ["../shared/lib/man-macro.rb", "../shared/lib/inter-document-references-macro.rb", "../shared/lib/sectnumoffset-treeprocessor.rb", "../shared/lib/packages-macro.rb", "../shared/lib/git-macro.rb"]
|
||||
extensions = ["man-macro", "inter-document-references-macro", "sectnumoffset-treeprocessor", "packages-macro", "git-macro"]
|
||||
|
||||
[outputs]
|
||||
home = [ "HTML" ]
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ MAINTAINER=carlavilla@FreeBSD.org
|
|||
|
||||
PYTHON_CMD = /usr/local/bin/python3
|
||||
HUGO_CMD = /usr/local/bin/hugo
|
||||
RUBYLIB = ../shared/lib
|
||||
.export RUBYLIB
|
||||
|
||||
.ifndef HOSTNAME
|
||||
.HOST+=localhost
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ preserveTOC = true
|
|||
|
||||
[markup.asciidocExt]
|
||||
preserveTOC = true
|
||||
extensions = ["../shared/lib/man-macro.rb", "../shared/lib/inter-document-references-macro.rb", "../shared/lib/sectnumoffset-treeprocessor.rb", "../shared/lib/packages-macro.rb", "../shared/lib/git-macro.rb"]
|
||||
extensions = ["man-macro", "inter-document-references-macro", "sectnumoffset-treeprocessor", "packages-macro", "git-macro"]
|
||||
|
||||
staticDir = ["static", "shared"]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue