diff --git a/documentation/Makefile b/documentation/Makefile index 4b594fcdca..72f5b89dda 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -1,53 +1,55 @@ # Generate the FreeBSD documentation # # Copyright (c) 2020-2021, The FreeBSD Documentation Project # Copyright (c) 2020-2021, Sergio Carlavilla # # Targets intended for use on the command line # # all (default) - generate the books TOC and compile all the documentation # run - serves the built documentation site for local browsing # # The run target uses hugo's built-in webserver to make the documentation site # available for local browsing. The documentation should have been built prior # to attempting to use the `run` target. By default, hugo will start its # webserver on port 1313. 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 .else .HOST+=$(HOSTNAME) .endif .ORDER: all run .ORDER: starting-message generate-books-toc .ORDER: starting-message build .ORDER: generate-books-toc build all: starting-message generate-books-toc build run: starting-message generate-books-toc run-local starting-message: .PHONY @echo --------------------------------------------------------------- @echo Building the documentation @echo --------------------------------------------------------------- generate-books-toc: .PHONY ${PYTHON_CMD} ./tools/books-toc-parts-creator.py -l ${LANGUAGES} ${PYTHON_CMD} ./tools/books-toc-creator.py -l ${LANGUAGES} ${PYTHON_CMD} ./tools/books-toc-figures-creator.py -l ${LANGUAGES} ${PYTHON_CMD} ./tools/books-toc-tables-creator.py -l ${LANGUAGES} ${PYTHON_CMD} ./tools/books-toc-examples-creator.py -l ${LANGUAGES} run-local: .PHONY ${HUGO_CMD} server -D --baseURL="http://$(.HOST):1313" build: .PHONY ${HUGO_CMD} --minify diff --git a/documentation/config/_default/config.toml b/documentation/config/_default/config.toml index 316f8bacd8..fd4b3983fc 100644 --- a/documentation/config/_default/config.toml +++ b/documentation/config/_default/config.toml @@ -1,29 +1,29 @@ # FreeBSD documentation # $FreeBSD$ baseURL = "https://docs.freebsd.org/" title = "The FreeBSD Project" copyright = "BSD 2-clause 'Simplified' License" DefaultContentLanguage = "en" defaultContentLanguageInSubdir = true disablePathToLower = true theme = "beastie" disableKinds = [ "taxonomy", "taxonomyTerm" ] authors = [ "carlavilla@FreeBSD.org" ] preserveTOC = true ignoreFiles = [ "chapters-order.adoc$", "toc.adoc$", "toc-tables.adoc$", "toc-figures.adoc$", "toc-examples.adoc$", "toc-1.adoc$", "toc-2.adoc$", "toc-3.adoc$", "toc-4.adoc$", "toc-5.adoc$", "books.adoc$", "chapter.adoc$" ] enableRobotsTXT = true [params] websiteURL = "https://www.FreeBSD.org/" [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" ] page = [ "HTML" ] list = [ "HTML" ] single = [ "HTML" ] section = [ "HTML" ] diff --git a/website/Makefile b/website/Makefile index 4b32bf76d7..a4b6bf497a 100644 --- a/website/Makefile +++ b/website/Makefile @@ -1,48 +1,50 @@ # Generate the FreeBSD website # # Copyright (c) 2020-2021, The FreeBSD Documentation Project # Copyright (c) 2020-2021, Sergio Carlavilla # # Targets intended for use on the command line # # all (default) - generate the releases.toml and compile all the website # run - serves the built website for local browsing # # The run target uses hugo's built-in webserver to make the built website # available for local browsing. The website should have been built prior # to attempting to use the `run` target. By default, hugo will start its # webserver on port 1313. 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 .else .HOST+=$(HOSTNAME) .endif .ORDER: all run .ORDER: starting-message generate-releases .ORDER: starting-message build .ORDER: generate-releases build all: starting-message generate-releases build run: starting-message generate-releases run-local starting-message: .PHONY @echo --------------------------------------------------------------- @echo Building the website @echo --------------------------------------------------------------- generate-releases: .PHONY ${PYTHON_CMD} ./tools/releases-toml.py -p ./shared/releases.adoc run-local: .PHONY ${HUGO_CMD} server -D --baseURL="http://$(.HOST):1313" build: .PHONY ${HUGO_CMD} diff --git a/website/config/_default/config.toml b/website/config/_default/config.toml index a7c4585ebe..cc754900b3 100644 --- a/website/config/_default/config.toml +++ b/website/config/_default/config.toml @@ -1,43 +1,43 @@ # FreeBSD website baseURL = "https://www.freebsd.org/" title = "The FreeBSD Project" copyright = "BSD 2-clause 'Simplified' License" DefaultContentLanguage = "en" defaultContentLanguageInSubdir = false theme = "beastie" disableKinds = [ "taxonomy", "taxonomyTerm" ] disableLanguages = ["tr", "el"] disablePathToLower = true authors = [ "carlavilla@FreeBSD.org" ] ignoreFiles = [ "report-sample.md$" ] enableRobotsTXT = true 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"] [outputs] home = [ "HTML" ] page = [ "HTML" ] list = [ "HTML" ] single = [ "HTML" ] section = [ "HTML", "RSS" ] [outputFormats] [outputFormats.Calendar] BaseName = "calendar" IsHTML = true IsPlainText = false [outputFormats.RSS] MediaType = "application/rss+xml" BaseName = "feed" IsHTML = true IsPlainText = false noUgly = true Rel = "alternate"