Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F158022994
D31926.id95022.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
66 KB
Referenced Files
None
Subscribers
None
D31926.id95022.diff
View Options
diff --git a/documentation/Makefile b/documentation/Makefile
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -33,9 +33,10 @@
RUBY_CMD = ${LOCALBASE}/bin/ruby
HUGO_CMD = ${LOCALBASE}/bin/hugo
HUGO_ARGS?= --verbose --minify
+HUGO_OFFLINE_ARGS?= --environment offline --verbose --minify
ASCIIDOCTOR_CMD= ${LOCALBASE}/bin/asciidoctor
ASCIIDOCTORPDF_CMD= ${LOCALBASE}/bin/asciidoctor-pdf
-SED_CMD = /usr/bin/sed
+
.if defined(DOC_LANG) && !empty(DOC_LANG)
LANGUAGES= ${DOC_LANG:S/,/ /g}
.if ${LANGUAGES:Men} == "" && ${.TARGETS:Mpdf*} == "" && ${.TARGETS:Mhtml*} == ""
@@ -124,6 +125,15 @@
${PYTHON_CMD} ./tools/books-toc-examples-creator.py -l ${BOOK_LANGS}
.endif
+generate-books-toc-offline: .PHONY
+.if !empty(BOOK_LANGS)
+ ${PYTHON_CMD} ./tools/books-toc-parts-creator.py -o -l ${BOOK_LANGS}
+ ${PYTHON_CMD} ./tools/books-toc-creator.py -o -l ${BOOK_LANGS}
+ ${PYTHON_CMD} ./tools/books-toc-figures-creator.py -o -l ${BOOK_LANGS}
+ ${PYTHON_CMD} ./tools/books-toc-tables-creator.py -o -l ${BOOK_LANGS}
+ ${PYTHON_CMD} ./tools/books-toc-examples-creator.py -o -l ${BOOK_LANGS}
+.endif
+
generate-pgpkeys-txt: static/pgpkeys/pgpkeys.txt
static/pgpkeys/pgpkeys.txt: static/pgpkeys/*key
@@ -136,13 +146,16 @@
build: .PHONY
HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} ${HUGO_ARGS}
+build-offline: .PHONY
+ HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} ${HUGO_OFFLINE_ARGS}
+
toc-clean: .PHONY
.if !empty(BOOK_LANGS)
- rm -f $$(${PYTHON_CMD} ./tools/books-toc-parts-creator.py -l ${BOOK_LANGS} -o)
- rm -f $$(${PYTHON_CMD} ./tools/books-toc-creator.py -l ${BOOK_LANGS} -o)
- rm -f $$(${PYTHON_CMD} ./tools/books-toc-figures-creator.py -l ${BOOK_LANGS} -o)
- rm -f $$(${PYTHON_CMD} ./tools/books-toc-tables-creator.py -l ${BOOK_LANGS} -o)
- rm -f $$(${PYTHON_CMD} ./tools/books-toc-examples-creator.py -l ${BOOK_LANGS} -o)
+ rm -f $$(${PYTHON_CMD} ./tools/books-toc-parts-creator.py -l ${BOOK_LANGS} -p)
+ rm -f $$(${PYTHON_CMD} ./tools/books-toc-creator.py -l ${BOOK_LANGS} -p)
+ rm -f $$(${PYTHON_CMD} ./tools/books-toc-figures-creator.py -l ${BOOK_LANGS} -p)
+ rm -f $$(${PYTHON_CMD} ./tools/books-toc-tables-creator.py -l ${BOOK_LANGS} -p)
+ rm -f $$(${PYTHON_CMD} ./tools/books-toc-examples-creator.py -l ${BOOK_LANGS} -p)
.endif
pgp-clean: .PHONY
@@ -157,252 +170,26 @@
#
pdf: pdf-articles pdf-books
-pdf-books-target:
+pdf-books: generate-books-toc
.for _lang in ${BOOK_LANGS}
-TMP+= ${.CURDIR}/content/${_lang}/books/*/
+ ./tools/asciidoctor.sh books ${_lang} pdf
.endfor
-BOOKSDIR != echo ${TMP}
-pdf-articles-target:
+pdf-articles:
.for _lang in ${ARTICLE_LANGS}
-TTMP += ${.CURDIR}/content/${_lang}/articles/*/
-.endfor
-ARTICLESDIR != echo ${TTMP}
-
-pdf-books: pdf-books-target generate-books-toc
-
-# Books build
-#
-# Notes:
-# pdf-theme=default-with-fallback-font is
-# used instead of pdf-theme=./themes/default-pdf-theme.yml because
-# it allows ja, ru, tr, zh-* fonts to be embedded and rendering is
-# better for other languages.
-#
-# asciidoctor-pdf-cjk and/or specific themes should be used for cjk
-# fonts
-.for _curpdf in ${BOOKSDIR}
- @mkdir -p ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}
-.if exists(${_curpdf}book.adoc)
- ${ASCIIDOCTORPDF_CMD} \
- -r ./shared/lib/man-macro.rb \
- -r ./shared/lib/man-macro.rb \
- -r ./shared/lib/git-macro.rb \
- -r ./shared/lib/packages-macro.rb \
- -r ./shared/lib/inter-document-references-macro.rb \
- -r ./shared/lib/sectnumoffset-treeprocessor.rb \
- --doctype=book \
- -a skip-front-matter \
- -a pdf-theme=default-with-fallback-font \
- -o ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}book.pdf \
- ${_curpdf}book.adoc
-.else
-# some books use _index.adoc as main document
- ${ASCIIDOCTORPDF_CMD} \
- -r ./shared/lib/man-macro.rb \
- -r ./shared/lib/man-macro.rb \
- -r ./shared/lib/git-macro.rb \
- -r ./shared/lib/packages-macro.rb \
- -r ./shared/lib/inter-document-references-macro.rb \
- -r ./shared/lib/sectnumoffset-treeprocessor.rb \
- --doctype=book \
- -a skip-front-matter \
- -a pdf-theme=default-with-fallback-font \
- -o ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}book.pdf \
- ${_curpdf}_index.adoc
-.endif
-.endfor
-
-pdf-articles: pdf-articles-target
-
-# Articles build
-.for _curpdf in ${ARTICLESDIR}
- @mkdir -p ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}
- ${ASCIIDOCTORPDF_CMD} \
- -r ./shared/lib/man-macro.rb \
- -r ./shared/lib/man-macro.rb \
- -r ./shared/lib/git-macro.rb \
- -r ./shared/lib/packages-macro.rb \
- -r ./shared/lib/inter-document-references-macro.rb \
- -r ./shared/lib/sectnumoffset-treeprocessor.rb \
- --doctype=article \
- -a skip-front-matter \
- -a pdf-theme=default-with-fallback-font \
- -o ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}article.pdf \
- ${_curpdf}_index.adoc
-.if exists(${.CURDIR}/static/source/articles/${_curpdf:H:T})
- cp -R ${.CURDIR}/static/source/articles/${_curpdf:H:T}/ \
- ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}
-.endif
+ ./tools/asciidoctor.sh articles ${_lang} pdf
.endfor
pdf-clean: pdf-articles-clean pdf-books-clean
-pdf-books-clean: pdf-books-target toc-clean
-.for _curpdf in ${BOOKSDIR}
- rm -f ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}book.pdf
-.endfor
+pdf-books-clean:
.for _lang in ${BOOK_LANGS}
rm -fr ${.CURDIR}/public/${_lang}/books
-rmdir ${.CURDIR}/public/${_lang}
.endfor
-rmdir ${.CURDIR}/public/
-#
-# HTML targets
-# Use DOC_LANG to choose the language, e.g., make DOC_LANG="en fr" html-books
-#
-html: html-articles html-books
-
-html-books-target:
-.for _lang in ${BOOK_LANGS}
-TMPH += ${.CURDIR}/content/${_lang}/books/*/
-.endfor
-BOOKSDIR != echo ${TMPH}
-
-html-articles-target:
-.for _lang in ${ARTICLE_LANGS}
-TTMPH += ${.CURDIR}/content/${_lang}/articles/*/
-.endfor
-ARTICLESDIR != echo ${TTMPH}
-
-html-books: html-books-target generate-books-toc
-
-# Books build
-#
-.for _curhtml in ${BOOKSDIR}
- @mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}
-.if exists(${_curhtml}book.adoc)
- ${ASCIIDOCTOR_CMD} \
- -B ${.CURDIR}/ \
- -r ./shared/lib/man-macro.rb \
- -r ./shared/lib/man-macro.rb \
- -r ./shared/lib/git-macro.rb \
- -r ./shared/lib/packages-macro.rb \
- -r ./shared/lib/inter-document-references-macro.rb \
- -r ./shared/lib/sectnumoffset-treeprocessor.rb \
- --doctype=book \
- -a skip-front-matter \
- -a linkcss -a copycss=${.CURDIR}/themes/beastie/static/css/docbook.css -a stylesheet=docbook.css -a stylesdir=../../css \
- -a iconfont-remote! -a iconfont-name=font-awesome-min \
- -o ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}book.html \
- ${_curhtml}book.adoc
-.if exists(${.CURDIR}/static/images/books/${_curhtml:H:T})
- @mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/images/books/
- cp -R ${.CURDIR}/static/images/books/${_curhtml:H:T}/ \
- ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/images/books/${_curhtml:H:T}/
- ${SED_CMD} -i '' -e "s|../../../../images|../../images|g" \
- ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}book.html
-.endif
-.else
-# some books use _index.adoc as main document
- ${ASCIIDOCTOR_CMD} \
- -B ${.CURDIR}/ \
- -r ./shared/lib/man-macro.rb \
- -r ./shared/lib/man-macro.rb \
- -r ./shared/lib/git-macro.rb \
- -r ./shared/lib/packages-macro.rb \
- -r ./shared/lib/inter-document-references-macro.rb \
- -r ./shared/lib/sectnumoffset-treeprocessor.rb \
- --doctype=book \
- -a skip-front-matter \
- -a linkcss -a copycss=${.CURDIR}/themes/beastie/static/css/docbook.css -a stylesheet=docbook.css -a stylesdir=../../css \
- -a iconfont-remote! -a iconfont-name=font-awesome-min \
- -o ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}book.html \
- ${_curhtml}_index.adoc
-.if exists(${.CURDIR}/static/images/books/${_curhtml:H:T})
- @mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/images/books/
- cp -R ${.CURDIR}/static/images/books/${_curhtml:H:T}/ \
- ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/images/books/${_curhtml:H:T}/
- ${SED_CMD} -i '' -e "s|../../../../images|../../images|g" \
- ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}book.html
-.endif
-.endif
-.if !exists(${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/fonts/)
- mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/fonts/
- cp -R ${.CURDIR}/themes/beastie/static/fonts/ \
- ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/fonts/
- cp ${.CURDIR}/themes/beastie/static/css/font-awesome-min.css \
- ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/css/
-.endif
-.endfor
-
-html-articles: html-articles-target
-
-# Articles build
-.for _curhtml in ${ARTICLESDIR}
- @mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}
- ${ASCIIDOCTOR_CMD} \
- -B ${.CURDIR}/ \
- -r ./shared/lib/man-macro.rb \
- -r ./shared/lib/man-macro.rb \
- -r ./shared/lib/git-macro.rb \
- -r ./shared/lib/packages-macro.rb \
- -r ./shared/lib/inter-document-references-macro.rb \
- -r ./shared/lib/sectnumoffset-treeprocessor.rb \
- --doctype=article \
- -a skip-front-matter \
- -a linkcss -a copycss=${.CURDIR}/themes/beastie/static/css/docbook.css -a stylesheet=docbook.css -a stylesdir=../../css \
- -a iconfont-remote! -a iconfont-name=font-awesome-min \
- -o ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}article.html \
- ${_curhtml}_index.adoc
-.if exists(${.CURDIR}/static/source/articles/${_curhtml:H:T})
- cp -R ${.CURDIR}/static/source/articles/${_curhtml:H:T}/ \
- ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}
-.endif
-.if exists(${.CURDIR}/static/images/articles/${_curhtml:H:T})
- @mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/images/articles/
- cp -R ${.CURDIR}/static/images/articles/${_curhtml:H:T}/ \
- ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/images/articles/${_curhtml:H:T}/
- ${SED_CMD} -i '' -e "s|../../../images|../../images|g" \
- ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}article.html
-.endif
-.if !exists(${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/fonts/)
- mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/fonts/
- cp -R ${.CURDIR}/themes/beastie/static/fonts/ \
- ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/fonts/
- cp ${.CURDIR}/themes/beastie/static/css/font-awesome-min.css \
- ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/css/
-.endif
-.endfor
-
-html-clean: html-resources-clean html-articles-clean html-books-clean
-
-html-resources-clean:
-.for _lang in ${LANGUAGES}
- rm -fr ${.CURDIR}/public/${_lang}/css
- rm -fr ${.CURDIR}/public/${_lang}/fonts
- rm -fr ${.CURDIR}/public/${_lang}/images
-.endfor
-
-html-books-clean: html-books-target toc-clean
-.for _curhtml in ${BOOKSDIR}
- rm -f ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}book.html ${_curhtml}toc*.adoc
- -rmdir ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}
-.endfor
-.for _lang in ${BOOK_LANGS}
- rm -fr ${.CURDIR}/public/${_lang}/books
- rm -fr ${.CURDIR}/public/${_lang}/images/books
- -rmdir ${.CURDIR}/public/${_lang}
-.endfor
- -rmdir ${.CURDIR}/public
-
-html-articles-clean: html-articles-target
-.for _curhtml in ${ARTICLESDIR}
- rm -f ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}article.html
- -rmdir ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}
-.endfor
-.for _lang in ${ARTICLE_LANGS}
- rm -fr ${.CURDIR}/public/${_lang}/articles
- rm -fr ${.CURDIR}/public/${_lang}/images/articles
- -rmdir ${.CURDIR}/public/${_lang}
-.endfor
- -rmdir ${.CURDIR}/public
-
-pdf-articles-clean: pdf-articles-target
-.for _curpdf in ${ARTICLESDIR}
- rm -f ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}article.pdf
-.endfor
+pdf-articles-clean:
.for _lang in ${ARTICLE_LANGS}
rm -fr ${.CURDIR}/public/${_lang}/articles
.if !exists(${.CURDIR}/public/${_lang}/books)
@@ -411,3 +198,9 @@
.endfor
-rmdir ${.CURDIR}/public
+#
+# HTML targets
+#
+html: generate-books-toc-offline build-offline
+
+html-clean: hugo-clean
diff --git a/documentation/config/_default/config.toml b/documentation/config/_default/config.toml
--- a/documentation/config/_default/config.toml
+++ b/documentation/config/_default/config.toml
@@ -1,5 +1,4 @@
# FreeBSD documentation
-# $FreeBSD$
baseURL = "https://docs.freebsd.org/"
title = "FreeBSD Documentation Portal"
@@ -10,17 +9,19 @@
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$", "\\.po$" ]
+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$", "contrib-386bsd.adoc$", "contrib-additional.adoc$", "contrib-committers.adoc$", "contrib-corealumni.adoc$", "contrib-develalumni.adoc$", "contrib-develinmemoriam.adoc$", "contrib-portmgralumni.adoc$", "\\.po$" ]
enableRobotsTXT = true
[params]
websiteURL = "https://www.FreeBSD.org/"
description = "FreeBSD Documentation Portal"
+ isOnline = true
[markup.asciidocExt]
preserveTOC = true
extensions = ["man-macro", "inter-document-references-macro", "sectnumoffset-treeprocessor", "packages-macro", "git-macro"]
+ [markup.asciidocExt.attributes]
+ isOnline = true
[outputs]
home = [ "HTML" ]
diff --git a/documentation/content/de/books/developers-handbook/_index.adoc b/documentation/content/de/books/developers-handbook/_index.adoc
--- a/documentation/content/de/books/developers-handbook/_index.adoc
+++ b/documentation/content/de/books/developers-handbook/_index.adoc
@@ -4,7 +4,8 @@
- author: The FreeBSD Documentation Project
copyright: 1995-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "apple", "ibm", "ieee", "intel", "linux", "microsoft", "opengroup", "sun", "general"]
+trademarks: ["freebsd", "apple", "ibm", "ieee", "intel", "linux", "microsoft", "opengroup", "sun", "general"]
+isIndex: true
---
= FreeBSD Developers' Handbook
diff --git a/documentation/content/de/books/faq/_index.adoc b/documentation/content/de/books/faq/_index.adoc
--- a/documentation/content/de/books/faq/_index.adoc
+++ b/documentation/content/de/books/faq/_index.adoc
@@ -4,7 +4,8 @@
- author: The FreeBSD Documentation Project
copyright: 1995-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+isIndex: true
---
= Häufig gestellte Fragen zu FreeBSD {rel2-relx} und {rel-relx}
diff --git a/documentation/content/de/books/handbook/_index.adoc b/documentation/content/de/books/handbook/_index.adoc
--- a/documentation/content/de/books/handbook/_index.adoc
+++ b/documentation/content/de/books/handbook/_index.adoc
@@ -6,6 +6,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "ibm", "ieee", "redhat", "3com", "adobe", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "realnetworks", "oracle", "3ware", "arm", "adaptec", "google", "heidelberger", "intuit", "lsilogic", "themathworks", "thomson", "vmware", "wolframresearch", "xiph", "xfree86", "general"]
next: books/handbook/preface
+isIndex: true
---
= FreeBSD Handbuch
diff --git a/documentation/content/de/books/porters-handbook/_index.adoc b/documentation/content/de/books/porters-handbook/_index.adoc
--- a/documentation/content/de/books/porters-handbook/_index.adoc
+++ b/documentation/content/de/books/porters-handbook/_index.adoc
@@ -4,7 +4,8 @@
- author: The FreeBSD Documentation Project
copyright: 2000-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "sun", "unix", "general"]
+trademarks: ["freebsd", "sun", "unix", "general"]
+isIndex: true
---
= FreeBSD Porter's Handbook
diff --git a/documentation/content/el/books/faq/_index.adoc b/documentation/content/el/books/faq/_index.adoc
--- a/documentation/content/el/books/faq/_index.adoc
+++ b/documentation/content/el/books/faq/_index.adoc
@@ -4,7 +4,8 @@
- author: Η Ομάδα Τεκμηρίωσης του FreeBSD
copyright: 1995-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "ibm", "ieee", "3com", "adobe", "intel", "linux", "microsoft", "opengroup", "sparc", "sun", "oracle", "xfree86", "general"]
+trademarks: ["freebsd", "ibm", "ieee", "3com", "adobe", "intel", "linux", "microsoft", "opengroup", "sparc", "sun", "oracle", "xfree86", "general"]
+isIndex: true
---
= Συχνές Ερωτήσεις για το FreeBSD 6.X και 7.X
diff --git a/documentation/content/el/books/handbook/_index.adoc b/documentation/content/el/books/handbook/_index.adoc
--- a/documentation/content/el/books/handbook/_index.adoc
+++ b/documentation/content/el/books/handbook/_index.adoc
@@ -6,6 +6,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "ibm", "ieee", "redhat", "3com", "adobe", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "realnetworks", "oracle", "3ware", "arm", "adaptec", "heidelberger", "intuit", "lsilogic", "themathworks", "thomson", "vmware", "wolframresearch", "xiph", "xfree86", "general"]
next: books/handbook/preface
+isIndex: true
---
= Εγχειρίδιο του FreeBSD
diff --git a/documentation/content/en/books/arch-handbook/_index.adoc b/documentation/content/en/books/arch-handbook/_index.adoc
--- a/documentation/content/en/books/arch-handbook/_index.adoc
+++ b/documentation/content/en/books/arch-handbook/_index.adoc
@@ -9,6 +9,7 @@
next: books/arch-handbook/parti
weight: 50
add_single_page_link: true
+isIndex: true
---
= FreeBSD Architecture Handbook
diff --git a/documentation/content/en/books/arch-handbook/parti.adoc b/documentation/content/en/books/arch-handbook/parti.adoc
--- a/documentation/content/en/books/arch-handbook/parti.adoc
+++ b/documentation/content/en/books/arch-handbook/parti.adoc
@@ -1,6 +1,6 @@
---
title: Part I. Kernel
-prev: books/arch-handbook/
+prev: books/arch-handbook
next: books/arch-handbook/boot
---
diff --git a/documentation/content/en/books/design-44bsd/_index.adoc b/documentation/content/en/books/design-44bsd/_index.adoc
--- a/documentation/content/en/books/design-44bsd/_index.adoc
+++ b/documentation/content/en/books/design-44bsd/_index.adoc
@@ -10,6 +10,7 @@
trademarks: ["design-44bsd"]
weight: 60
tags: ["4.4BSD", "design", "operating system", "BSD", "UNIX"]
+isIndex: true
---
= The Design and Implementation of the 4.4BSD Operating System
diff --git a/documentation/content/en/books/dev-model/_index.adoc b/documentation/content/en/books/dev-model/_index.adoc
--- a/documentation/content/en/books/dev-model/_index.adoc
+++ b/documentation/content/en/books/dev-model/_index.adoc
@@ -7,6 +7,7 @@
trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
weight: 45
tags: ["model", "project model", "FreeBSD"]
+isIndex: true
---
= A project model for the FreeBSD Project
diff --git a/documentation/content/en/books/developers-handbook/_index.adoc b/documentation/content/en/books/developers-handbook/_index.adoc
--- a/documentation/content/en/books/developers-handbook/_index.adoc
+++ b/documentation/content/en/books/developers-handbook/_index.adoc
@@ -9,6 +9,7 @@
weight: 25
tags: ["FreeBSD Developers' Handbook"]
add_single_page_link: true
+isIndex: true
---
= FreeBSD Developers' Handbook
diff --git a/documentation/content/en/books/developers-handbook/parti.adoc b/documentation/content/en/books/developers-handbook/parti.adoc
--- a/documentation/content/en/books/developers-handbook/parti.adoc
+++ b/documentation/content/en/books/developers-handbook/parti.adoc
@@ -1,6 +1,6 @@
---
title: Part I. Basics
-prev: books/developers-handbook/
+prev: books/developers-handbook
next: books/developers-handbook/introduction
---
diff --git a/documentation/content/en/books/faq/_index.adoc b/documentation/content/en/books/faq/_index.adoc
--- a/documentation/content/en/books/faq/_index.adoc
+++ b/documentation/content/en/books/faq/_index.adoc
@@ -7,6 +7,7 @@
trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
weight: 5
tags: ["FAQ", "FreeBSD FAQ"]
+isIndex: true
---
= Frequently Asked Questions for FreeBSD {rel2-relx} and {rel-relx}
diff --git a/documentation/content/en/books/fdp-primer/_index.adoc b/documentation/content/en/books/fdp-primer/_index.adoc
--- a/documentation/content/en/books/fdp-primer/_index.adoc
+++ b/documentation/content/en/books/fdp-primer/_index.adoc
@@ -9,6 +9,7 @@
weight: 10
tags: ["FDP", "documentation", "FreeBSD", "Index"]
add_single_page_link: true
+isIndex: true
---
= FreeBSD Documentation Project Primer for New Contributors
diff --git a/documentation/content/en/books/fdp-primer/preface/_index.adoc b/documentation/content/en/books/fdp-primer/preface/_index.adoc
--- a/documentation/content/en/books/fdp-primer/preface/_index.adoc
+++ b/documentation/content/en/books/fdp-primer/preface/_index.adoc
@@ -1,6 +1,6 @@
---
title: Preface
-prev: books/fdp-primer/
+prev: books/fdp-primer
next: books/fdp-primer/overview
description: Preface about the FreeBSD Documentation Project
tags: ["preface", "prompts", "conventions"]
diff --git a/documentation/content/en/books/handbook/_index.adoc b/documentation/content/en/books/handbook/_index.adoc
--- a/documentation/content/en/books/handbook/_index.adoc
+++ b/documentation/content/en/books/handbook/_index.adoc
@@ -9,6 +9,7 @@
next: books/handbook/preface
weight: 1
add_single_page_link: true
+isIndex: true
---
= FreeBSD Handbook
diff --git a/documentation/content/en/books/handbook/preface/_index.adoc b/documentation/content/en/books/handbook/preface/_index.adoc
--- a/documentation/content/en/books/handbook/preface/_index.adoc
+++ b/documentation/content/en/books/handbook/preface/_index.adoc
@@ -1,6 +1,6 @@
---
title: Preface
-prev: books/handbook/
+prev: books/handbook
next: books/handbook/parti
description: The FreeBSD newcomer will find that the first section of this book guides the user through the FreeBSD installation process and gently introduces the concepts and conventions that underpin UNIX
tags: ["preface", "audience", "organization", "conventions", "acknowledgments"]
diff --git a/documentation/content/en/books/porters-handbook/_index.adoc b/documentation/content/en/books/porters-handbook/_index.adoc
--- a/documentation/content/en/books/porters-handbook/_index.adoc
+++ b/documentation/content/en/books/porters-handbook/_index.adoc
@@ -9,6 +9,7 @@
weight: 15
tags: ["FreeBSD Porter's Handbook", "Porting", "FreeBSD Ports Collection"]
add_single_page_link: true
+isIndex: true
---
= FreeBSD Porter's Handbook
diff --git a/documentation/content/en/books/porters-handbook/porting-why/_index.adoc b/documentation/content/en/books/porters-handbook/porting-why/_index.adoc
--- a/documentation/content/en/books/porters-handbook/porting-why/_index.adoc
+++ b/documentation/content/en/books/porters-handbook/porting-why/_index.adoc
@@ -1,6 +1,6 @@
---
title: Chapter 1. Introduction
-prev: books/porters-handbook/
+prev: books/porters-handbook
next: books/porters-handbook/new-port
description: Why port a program to the FreeBSD Ports Collection
tags: ["ports", "why porting"]
diff --git a/documentation/content/es/books/faq/_index.adoc b/documentation/content/es/books/faq/_index.adoc
--- a/documentation/content/es/books/faq/_index.adoc
+++ b/documentation/content/es/books/faq/_index.adoc
@@ -3,7 +3,8 @@
authors:
- author: El proyecto de documentación de FreeBSD
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+isIndex: true
---
= Preguntas Frecuentes para FreeBSD 9.X y 10.X
diff --git a/documentation/content/es/books/handbook/_index.adoc b/documentation/content/es/books/handbook/_index.adoc
--- a/documentation/content/es/books/handbook/_index.adoc
+++ b/documentation/content/es/books/handbook/_index.adoc
@@ -6,6 +6,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "ibm", "ieee", "redhat", "3com", "adobe", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "realnetworks", "oracle", "3ware", "arm", "adaptec", "google", "heidelberger", "intuit", "lsilogic", "themathworks", "thomson", "vmware", "wolframresearch", "xiph", "xfree86", "general"]
next: books/handbook/preface
+isIndex: true
---
= Manual de FreeBSD
diff --git a/documentation/content/fr/books/developers-handbook/_index.adoc b/documentation/content/fr/books/developers-handbook/_index.adoc
--- a/documentation/content/fr/books/developers-handbook/_index.adoc
+++ b/documentation/content/fr/books/developers-handbook/_index.adoc
@@ -4,7 +4,8 @@
- author: Le groupe du projet de documentation FreeBSD
copyright: 1995-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "apple", "ibm", "ieee", "intel", "linux", "microsoft", "opengroup", "sun", "general"]
+trademarks: ["freebsd", "apple", "ibm", "ieee", "intel", "linux", "microsoft", "opengroup", "sun", "general"]
+isIndex: true
---
= Livre de chevet du développeur FreeBSD
diff --git a/documentation/content/fr/books/faq/_index.adoc b/documentation/content/fr/books/faq/_index.adoc
--- a/documentation/content/fr/books/faq/_index.adoc
+++ b/documentation/content/fr/books/faq/_index.adoc
@@ -4,7 +4,8 @@
- author: The FreeBSD Documentation Project
copyright: 1995-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+isIndex: true
---
= Questions Fréquemment Posées sur FreeBSD 2.X, 3.X et 4.X
diff --git a/documentation/content/fr/books/handbook/_index.adoc b/documentation/content/fr/books/handbook/_index.adoc
--- a/documentation/content/fr/books/handbook/_index.adoc
+++ b/documentation/content/fr/books/handbook/_index.adoc
@@ -4,6 +4,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "ibm", "ieee", "redhat", "3com", "adobe", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "realnetworks", "oracle", "3ware", "arm", "adaptec", "google", "heidelberger", "intuit", "lsilogic", "themathworks", "thomson", "vmware", "wolframresearch", "xiph", "xfree86", "general"]
next: books/handbook/preface
+isIndex: true
---
= Manuel FreeBSD
diff --git a/documentation/content/hu/books/faq/_index.adoc b/documentation/content/hu/books/faq/_index.adoc
--- a/documentation/content/hu/books/faq/_index.adoc
+++ b/documentation/content/hu/books/faq/_index.adoc
@@ -4,7 +4,8 @@
- author: A FreeBSD Dokumentációs Projekt
copyright: 1995-2020 A FreeBSD Dokumentációs Projekt
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "ibm", "ieee", "3com", "adobe", "intel", "linux", "microsoft", "opengroup", "sparc", "sun", "oracle", "xfree86", "general"]
+trademarks: ["freebsd", "ibm", "ieee", "3com", "adobe", "intel", "linux", "microsoft", "opengroup", "sparc", "sun", "oracle", "xfree86", "general"]
+isIndex: true
---
= Gyakran Ismételt Kérdések a FreeBSD 6.X, 7.X és 8.X változatairól
diff --git a/documentation/content/hu/books/handbook/_index.adoc b/documentation/content/hu/books/handbook/_index.adoc
--- a/documentation/content/hu/books/handbook/_index.adoc
+++ b/documentation/content/hu/books/handbook/_index.adoc
@@ -6,6 +6,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "ibm", "ieee", "redhat", "3com", "adobe", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "realnetworks", "oracle", "3ware", "arm", "adaptec", "google", "heidelberger", "intuit", "lsilogic", "themathworks", "thomson", "vmware", "wolframresearch", "xiph", "xfree86", "general"]
next: books/handbook/preface
+isIndex: true
---
= FreeBSD kézikönyv
diff --git a/documentation/content/it/books/handbook/_index.adoc b/documentation/content/it/books/handbook/_index.adoc
--- a/documentation/content/it/books/handbook/_index.adoc
+++ b/documentation/content/it/books/handbook/_index.adoc
@@ -6,6 +6,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "3com", "3ware", "arm", "adaptec", "adobe", "apple", "corel", "creative", "cvsup", "heidelberger", "ibm", "ieee", "intel", "intuit", "linux", "lsilogic", "m-systems", "macromedia", "microsoft", "netscape", "nexthop", "opengroup", "oracle", "powerquest", "realnetworks", "redhat", "sap", "sun", "symantec", "themathworks", "thomson", "usrobotics", "vmware", "waterloomaple", "wolframresearch", "xfree86", "xiph", "general"]
next: books/handbook/preface
+isIndex: true
---
= Manuale di FreeBSD
diff --git a/documentation/content/ja/books/design-44bsd/_index.adoc b/documentation/content/ja/books/design-44bsd/_index.adoc
--- a/documentation/content/ja/books/design-44bsd/_index.adoc
+++ b/documentation/content/ja/books/design-44bsd/_index.adoc
@@ -7,7 +7,8 @@
- author: John S. Quarterman [FAMILY Given]
copyright: 1996 Addison-Wesley Longman, Inc
releaseinfo: "$FreeBSD$"
-trademarks: ["design-44bsd"]
+trademarks: ["design-44bsd"]
+isIndex: true
---
= 4.4BSD オペレーティングシステムの設計と実装
diff --git a/documentation/content/ja/books/faq/_index.adoc b/documentation/content/ja/books/faq/_index.adoc
--- a/documentation/content/ja/books/faq/_index.adoc
+++ b/documentation/content/ja/books/faq/_index.adoc
@@ -4,7 +4,8 @@
- author: FreeBSD ドキュメンテーションプロジェクト
copyright: 1995-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+isIndex: true
---
= FreeBSD 2.X、3.X、4.X についての FAQ (よくある質問とその答え)
diff --git a/documentation/content/ja/books/handbook/_index.adoc b/documentation/content/ja/books/handbook/_index.adoc
--- a/documentation/content/ja/books/handbook/_index.adoc
+++ b/documentation/content/ja/books/handbook/_index.adoc
@@ -6,6 +6,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "ibm", "ieee", "redhat", "3com", "adobe", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "realnetworks", "oracle", "3ware", "arm", "adaptec", "google", "heidelberger", "intuit", "lsilogic", "themathworks", "thomson", "vmware", "wolframresearch", "xiph", "xfree86", "general"]
next: books/handbook/preface
+isIndex: true
---
= FreeBSD ハンドブック
diff --git a/documentation/content/ja/books/porters-handbook/_index.adoc b/documentation/content/ja/books/porters-handbook/_index.adoc
--- a/documentation/content/ja/books/porters-handbook/_index.adoc
+++ b/documentation/content/ja/books/porters-handbook/_index.adoc
@@ -5,6 +5,7 @@
copyright: 2000-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "sun", "unix", "general"]
+isIndex: true
---
= FreeBSD port 作成者のためのハンドブック
diff --git a/documentation/content/mn/books/handbook/_index.adoc b/documentation/content/mn/books/handbook/_index.adoc
--- a/documentation/content/mn/books/handbook/_index.adoc
+++ b/documentation/content/mn/books/handbook/_index.adoc
@@ -6,6 +6,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "ibm", "ieee", "redhat", "3com", "adobe", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "realnetworks", "oracle", "3ware", "arm", "adaptec", "heidelberger", "intuit", "lsilogic", "themathworks", "thomson", "vmware", "wolframresearch", "xiph", "xfree86", "general"]
next: books/handbook/preface
+isIndex: true
---
= FreeBSD гарын авлага
diff --git a/documentation/content/nl/books/handbook/_index.adoc b/documentation/content/nl/books/handbook/_index.adoc
--- a/documentation/content/nl/books/handbook/_index.adoc
+++ b/documentation/content/nl/books/handbook/_index.adoc
@@ -6,6 +6,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "ibm", "ieee", "redhat", "3com", "adobe", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "realnetworks", "oracle", "3ware", "arm", "adaptec", "heidelberger", "intuit", "lsilogic", "themathworks", "thomson", "vmware", "wolframresearch", "xiph", "xfree86", "general"]
next: books/handbook/preface
+isIndex: true
---
= FreeBSD handboek
diff --git a/documentation/content/pl/books/handbook/_index.adoc b/documentation/content/pl/books/handbook/_index.adoc
--- a/documentation/content/pl/books/handbook/_index.adoc
+++ b/documentation/content/pl/books/handbook/_index.adoc
@@ -6,6 +6,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "ibm", "ieee", "redhat", "3com", "adobe", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "realnetworks", "oracle", "3ware", "arm", "adaptec", "google", "heidelberger", "intuit", "lsilogic", "themathworks", "thomson", "vmware", "wolframresearch", "xiph", "xfree86", "general"]
next: books/handbook/preface
+isIndex: true
---
= Podręcznik FreeBSD
diff --git a/documentation/content/pt-br/books/dev-model/_index.adoc b/documentation/content/pt-br/books/dev-model/_index.adoc
--- a/documentation/content/pt-br/books/dev-model/_index.adoc
+++ b/documentation/content/pt-br/books/dev-model/_index.adoc
@@ -3,7 +3,8 @@
authors:
- author: Niklas Saers
copyright: Copyright © 2002-2005 Niklas Saers
-trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+isIndex: true
---
= Um modelo de projeto para o projeto FreeBSD
diff --git a/documentation/content/pt-br/books/faq/_index.adoc b/documentation/content/pt-br/books/faq/_index.adoc
--- a/documentation/content/pt-br/books/faq/_index.adoc
+++ b/documentation/content/pt-br/books/faq/_index.adoc
@@ -2,7 +2,8 @@
title: Perguntas freqüentes para o FreeBSD 11.X e 12.X
authors:
releaseinfo: "$FreeBSD$"
-trademarks: []
+trademarks: []
+isIndex: true
---
= Perguntas freqüentes para o FreeBSD {rel2-relx} e {rel-relx}
diff --git a/documentation/content/pt-br/books/fdp-primer/_index.adoc b/documentation/content/pt-br/books/fdp-primer/_index.adoc
--- a/documentation/content/pt-br/books/fdp-primer/_index.adoc
+++ b/documentation/content/pt-br/books/fdp-primer/_index.adoc
@@ -10,6 +10,7 @@
title: 'Primer do Projeto de Documentação do FreeBSD para Novos Colaboradores'
trademarks: ["general"]
weight: 10
+isIndex: true
---
= Primer do Projeto de Documentação do FreeBSD para Novos Colaboradores
diff --git a/documentation/content/pt-br/books/handbook/_index.adoc b/documentation/content/pt-br/books/handbook/_index.adoc
--- a/documentation/content/pt-br/books/handbook/_index.adoc
+++ b/documentation/content/pt-br/books/handbook/_index.adoc
@@ -6,6 +6,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "ibm", "ieee", "redhat", "3com", "adobe", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "realnetworks", "oracle", "3ware", "arm", "adaptec", "google", "heidelberger", "intuit", "lsilogic", "themathworks", "thomson", "vmware", "wolframresearch", "xiph", "xfree86", "general"]
next: books/handbook/preface
+isIndex: true
---
= FreeBSD Handbook
diff --git a/documentation/content/pt-br/books/porters-handbook/_index.adoc b/documentation/content/pt-br/books/porters-handbook/_index.adoc
--- a/documentation/content/pt-br/books/porters-handbook/_index.adoc
+++ b/documentation/content/pt-br/books/porters-handbook/_index.adoc
@@ -4,7 +4,8 @@
- author: Projeto de Documentação do FreeBSD
copyright: 2000-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "sun", "unix", "general"]
+trademarks: ["freebsd", "sun", "unix", "general"]
+isIndex: true
---
= FreeBSD Porter's Handbook
diff --git a/documentation/content/ru/books/design-44bsd/_index.adoc b/documentation/content/ru/books/design-44bsd/_index.adoc
--- a/documentation/content/ru/books/design-44bsd/_index.adoc
+++ b/documentation/content/ru/books/design-44bsd/_index.adoc
@@ -7,7 +7,8 @@
- author: John S. Quarterman
copyright: 1996 Addison-Wesley Longman, Inc
releaseinfo: "$FreeBSD$"
-trademarks: ["design-44bsd"]
+trademarks: ["design-44bsd"]
+isIndex: true
---
= Архитектура и реализация операционной системы 4.4BSD
diff --git a/documentation/content/ru/books/developers-handbook/_index.adoc b/documentation/content/ru/books/developers-handbook/_index.adoc
--- a/documentation/content/ru/books/developers-handbook/_index.adoc
+++ b/documentation/content/ru/books/developers-handbook/_index.adoc
@@ -4,7 +4,8 @@
- author: The FreeBSD Documentation Project
copyright: 1995-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "apple", "ibm", "ieee", "intel", "linux", "microsoft", "opengroup", "sun", "general"]
+trademarks: ["freebsd", "apple", "ibm", "ieee", "intel", "linux", "microsoft", "opengroup", "sun", "general"]
+isIndex: true
---
= Руководство FreeBSD для разработчиков
diff --git a/documentation/content/ru/books/faq/_index.adoc b/documentation/content/ru/books/faq/_index.adoc
--- a/documentation/content/ru/books/faq/_index.adoc
+++ b/documentation/content/ru/books/faq/_index.adoc
@@ -4,7 +4,8 @@
- author: Проект документации FreeBSD
copyright: 1995-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+isIndex: true
---
= Часто задаваемые вопросы по FreeBSD {rel2-relx} и {rel-relx}
diff --git a/documentation/content/ru/books/handbook/_index.adoc b/documentation/content/ru/books/handbook/_index.adoc
--- a/documentation/content/ru/books/handbook/_index.adoc
+++ b/documentation/content/ru/books/handbook/_index.adoc
@@ -6,6 +6,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "ibm", "ieee", "redhat", "3com", "adobe", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "realnetworks", "oracle", "3ware", "arm", "adaptec", "heidelberger", "intuit", "lsilogic", "themathworks", "thomson", "vmware", "wolframresearch", "xiph", "xfree86", "general"]
next: books/handbook/preface
+isIndex: true
---
= FreeBSD Handbook
diff --git a/documentation/content/ru/books/porters-handbook/_index.adoc b/documentation/content/ru/books/porters-handbook/_index.adoc
--- a/documentation/content/ru/books/porters-handbook/_index.adoc
+++ b/documentation/content/ru/books/porters-handbook/_index.adoc
@@ -4,7 +4,8 @@
- author: The FreeBSD Documentation Project
copyright: 2000-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "sun", "unix", "general"]
+trademarks: ["freebsd", "sun", "unix", "general"]
+isIndex: true
---
= Руководство FreeBSD по созданию портов
diff --git a/documentation/content/zh-cn/books/arch-handbook/_index.adoc b/documentation/content/zh-cn/books/arch-handbook/_index.adoc
--- a/documentation/content/zh-cn/books/arch-handbook/_index.adoc
+++ b/documentation/content/zh-cn/books/arch-handbook/_index.adoc
@@ -5,7 +5,8 @@
- author: FreeBSD 中文计划
copyright: Copyright © 2000-2006, 2012-2013 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "apple", "microsoft", "unix", "general"]
+trademarks: ["freebsd", "apple", "microsoft", "unix", "general"]
+isIndex: true
---
= FreeBSD 系统结构手册
diff --git a/documentation/content/zh-cn/books/handbook/_index.adoc b/documentation/content/zh-cn/books/handbook/_index.adoc
--- a/documentation/content/zh-cn/books/handbook/_index.adoc
+++ b/documentation/content/zh-cn/books/handbook/_index.adoc
@@ -7,6 +7,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "ibm", "ieee", "redhat", "3com", "adobe", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "realnetworks", "oracle", "3ware", "arm", "adaptec", "heidelberger", "intuit", "lsilogic", "themathworks", "thomson", "vmware", "wolframresearch", "xiph", "xfree86", "general"]
next: books/handbook/preface
+isIndex: true
---
= FreeBSD 使用手册
diff --git a/documentation/content/zh-cn/books/porters-handbook/_index.adoc b/documentation/content/zh-cn/books/porters-handbook/_index.adoc
--- a/documentation/content/zh-cn/books/porters-handbook/_index.adoc
+++ b/documentation/content/zh-cn/books/porters-handbook/_index.adoc
@@ -5,7 +5,8 @@
- author: FreeBSD 中文计划
copyright: 2000-2020 The FreeBSD Documentation Project
trademarks: ["freebsd", "sun", "unix", "general"]
-releaseinfo: "$FreeBSD$"
+releaseinfo: "$FreeBSD$"
+isIndex: true
---
= FreeBSD Porter 手册
diff --git a/documentation/content/zh-tw/books/developers-handbook/_index.adoc b/documentation/content/zh-tw/books/developers-handbook/_index.adoc
--- a/documentation/content/zh-tw/books/developers-handbook/_index.adoc
+++ b/documentation/content/zh-tw/books/developers-handbook/_index.adoc
@@ -4,7 +4,8 @@
- author: FreeBSD 文件計畫
copyright: 1995-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "ibm", "ieee", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "general"]
+trademarks: ["freebsd", "ibm", "ieee", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "general"]
+isIndex: true
---
= FreeBSD Developers' Handbook
diff --git a/documentation/content/zh-tw/books/faq/_index.adoc b/documentation/content/zh-tw/books/faq/_index.adoc
--- a/documentation/content/zh-tw/books/faq/_index.adoc
+++ b/documentation/content/zh-tw/books/faq/_index.adoc
@@ -4,7 +4,8 @@
- author: FreeBSD 文件計畫
copyright: 1995-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+trademarks: ["freebsd", "ibm", "ieee", "adobe", "intel", "linux", "microsoft", "opengroup", "sun", "netbsd", "general"]
+isIndex: true
---
= FreeBSD {rel2-relx} and {rel-relx} 常見問答集
diff --git a/documentation/content/zh-tw/books/handbook/_index.adoc b/documentation/content/zh-tw/books/handbook/_index.adoc
--- a/documentation/content/zh-tw/books/handbook/_index.adoc
+++ b/documentation/content/zh-tw/books/handbook/_index.adoc
@@ -6,6 +6,7 @@
releaseinfo: "$FreeBSD$"
trademarks: ["freebsd", "ibm", "ieee", "redhat", "3com", "adobe", "apple", "intel", "linux", "microsoft", "opengroup", "sun", "realnetworks", "oracle", "3ware", "arm", "adaptec", "google", "heidelberger", "intuit", "lsilogic", "themathworks", "thomson", "vmware", "wolframresearch", "xiph", "xfree86", "general"]
next: books/handbook/preface
+isIndex: true
---
= FreeBSD 使用手冊
diff --git a/documentation/content/zh-tw/books/porters-handbook/_index.adoc b/documentation/content/zh-tw/books/porters-handbook/_index.adoc
--- a/documentation/content/zh-tw/books/porters-handbook/_index.adoc
+++ b/documentation/content/zh-tw/books/porters-handbook/_index.adoc
@@ -4,7 +4,8 @@
- author: The FreeBSD Documentation Project
copyright: 2000-2020 The FreeBSD Documentation Project
releaseinfo: "$FreeBSD$"
-trademarks: ["freebsd", "sun", "unix", "general"]
+trademarks: ["freebsd", "sun", "unix", "general"]
+isIndex: true
---
= FreeBSD Porter 手冊
diff --git a/documentation/themes/beastie/layouts/articles/baseof.html b/documentation/themes/beastie/layouts/articles/baseof.html
--- a/documentation/themes/beastie/layouts/articles/baseof.html
+++ b/documentation/themes/beastie/layouts/articles/baseof.html
@@ -11,13 +11,22 @@
<title>{{ block "title" . }}{{ .Site.Title }}{{ with .Params.Title }} | {{ . }}{{ end }}{{ end }}</title>
<!-- FAVICON -->
+ {{ if $.Site.Params.isOnline }}
<link rel="shortcut icon" href="{{ absLangURL ($.Site.BaseURL) }}favicon.ico">
+ {{ else }}
+ <link rel="shortcut icon" href="../../../favicon.ico">
+ {{ end }}
<meta name="theme-color" content="#790000">
<!-- END FAVICON -->
+ {{ if $.Site.Params.isOnline }}
<link rel="stylesheet" href="{{ absLangURL ($.Site.BaseURL) }}css/docbook.css">
<link rel="stylesheet" href="{{ absLangURL ($.Site.BaseURL) }}css/font-awesome-min.css">
+ {{ else }}
+ <link rel="stylesheet" href="../../../css/docbook.css">
+ <link rel="stylesheet" href="../../../css/font-awesome-min.css">
+ {{ end }}
<!-- SEO -->
<meta name="twitter:card" content="summary"/>
@@ -44,7 +53,9 @@
</script>
<!-- END SEO -->
+ {{ if $.Site.Params.isOnline }}
<script src="{{ absLangURL ($.Site.BaseURL) }}js/google.js"></script>
+ {{ end }}
</head>
<body>
<main>
diff --git a/documentation/themes/beastie/layouts/articles/single.html b/documentation/themes/beastie/layouts/articles/single.html
--- a/documentation/themes/beastie/layouts/articles/single.html
+++ b/documentation/themes/beastie/layouts/articles/single.html
@@ -43,7 +43,7 @@
{{ $releaseInfo := split .Params.releaseinfo " " }}
{{if gt (len $releaseInfo) 3}}
- Revision:
+ {{ i18n "revision" }}:
<a href="https://cgit.freebsd.org/doc/commit/?id=">
<span class="gitref">{{ index $releaseInfo 2 }}</span>
</a>
diff --git a/documentation/themes/beastie/layouts/books/baseof.html b/documentation/themes/beastie/layouts/books/baseof.html
--- a/documentation/themes/beastie/layouts/books/baseof.html
+++ b/documentation/themes/beastie/layouts/books/baseof.html
@@ -11,13 +11,27 @@
<title>{{ block "title" . }}{{ .Site.Title }}{{ with .Params.Title }} | {{ . }}{{ end }}{{ end }}</title>
<!-- FAVICON -->
+ {{ if $.Site.Params.isOnline }}
<link rel="shortcut icon" href="{{ absLangURL ($.Site.BaseURL) }}favicon.ico">
+ {{ else }}
+ <link rel="shortcut icon" href="../../../../favicon.ico">
+ {{ end }}
<meta name="theme-color" content="#790000">
<!-- END FAVICON -->
+ {{ if $.Site.Params.isOnline }}
<link rel="stylesheet" href="{{ absLangURL ($.Site.BaseURL) }}css/docbook.css">
<link rel="stylesheet" href="{{ absLangURL ($.Site.BaseURL) }}css/font-awesome-min.css">
+ {{ else }}
+ {{ if .Params.isIndex }}
+ <link rel="stylesheet" href="../../../css/docbook.css">
+ <link rel="stylesheet" href="../../../css/font-awesome-min.css">
+ {{ else }}
+ <link rel="stylesheet" href="../../../../css/docbook.css">
+ <link rel="stylesheet" href="../../../../css/font-awesome-min.css">
+ {{ end }}
+ {{ end }}
<!-- SEO -->
<meta name="twitter:card" content="summary"/>
@@ -44,7 +58,9 @@
</script>
<!-- END SEO -->
+ {{ if $.Site.Params.isOnline }}
<script src="{{ absLangURL ($.Site.BaseURL) }}js/google.js"></script>
+ {{ end }}
</head>
<body>
<main>
diff --git a/documentation/themes/beastie/layouts/books/list.html b/documentation/themes/beastie/layouts/books/list.html
--- a/documentation/themes/beastie/layouts/books/list.html
+++ b/documentation/themes/beastie/layouts/books/list.html
@@ -3,7 +3,19 @@
<div class="navheader">
<div class="prev">
{{ if .Params.prev }}
- <a href={{ .Params.Prev | absLangURL }}>{{ i18n "prev" }}</a>
+ {{ if $.Site.Params.isOnline }}
+ <a href={{ .Params.Prev | absLangURL }}>{{ i18n "prev" }}</a>
+ {{ else }}
+ {{ $pathSectionsPrev := split .Params.Prev "/" }}
+
+ {{if eq (len $pathSectionsPrev) 3}}
+ {{ $path := index $pathSectionsPrev 2 }}
+ <a href=../{{ $path }}/index.html>{{ i18n "prev" }}</a>
+ {{ end }}
+ {{if eq (len $pathSectionsPrev) 2}}
+ <a href=../index.html>{{ i18n "prev" }}</a>
+ {{ end }}
+ {{ end }}
{{ end }}
</div>
<div class="chapter">
@@ -14,7 +26,24 @@
</div>
<div class="next">
{{ if .Params.next }}
+ {{ if $.Site.Params.isOnline }}
<a href={{ .Params.Next | absLangURL }}>{{ i18n "next" }}</a>
+ {{ else }}
+ {{ $pathSectionsNext := split .Params.Next "/" }}
+ {{if eq (len $pathSectionsNext) 3}}
+ {{ if .Params.isIndex }}
+ {{ $book := index $pathSectionsNext 1 }}
+ {{ $path := index $pathSectionsNext 2 }}
+ <a href=../{{ $book }}/{{ $path }}/index.html>{{ i18n "next" }}</a>
+ {{ else }}
+ {{ $path := index $pathSectionsNext 2 }}
+ <a href=../{{ $path }}/index.html>{{ i18n "next" }}</a>
+ {{ end }}
+ {{ end }}
+ {{if eq (len $pathSectionsNext) 2}}
+ <a href=../index.html>{{ i18n "next" }}</a>
+ {{ end }}
+ {{ end }}
{{ end }}
</div>
</div>
@@ -82,12 +111,12 @@
{{ i18n "last-modified" }} {{ index $releaseInfo 3 }} {{ $hour }} {{ i18n "by" }} {{ index $releaseInfo 5 }}.
{{ end }}
</div>
-{{ if .Params.add_split_page_link }}
+{{ if and (.Params.add_split_page_link) ($.Site.Params.isOnline) }}
<div>
[ <a href="../">Split HTML</a> / Single HTML ]
</div>
{{ end }}
-{{ if .Params.add_single_page_link }}
+{{ if and (.Params.add_single_page_link) ($.Site.Params.isOnline) }}
<div>
[ Split HTML / <a href="book/">Single HTML</a> ]
</div>
@@ -97,7 +126,19 @@
<div class="navfooter">
<div class="prev">
{{ if .Params.prev }}
- <a href={{ .Params.Prev | absLangURL }}>{{ i18n "prev" }}</a>
+ {{ if $.Site.Params.isOnline }}
+ <a href={{ .Params.Prev | absLangURL }}>{{ i18n "prev" }}</a>
+ {{ else }}
+ {{ $pathSectionsPrev := split .Params.Prev "/" }}
+
+ {{if eq (len $pathSectionsPrev) 3}}
+ {{ $path := index $pathSectionsPrev 2 }}
+ <a href=../{{ $path }}/index.html>{{ i18n "prev" }}</a>
+ {{ end }}
+ {{if eq (len $pathSectionsPrev) 2}}
+ <a href=../index.html>{{ i18n "prev" }}</a>
+ {{ end }}
+ {{ end }}
{{ end }}
</div>
<div class="home">
@@ -105,7 +146,24 @@
</div>
<div class="next">
{{ if .Params.next }}
+ {{ if $.Site.Params.isOnline }}
<a href={{ .Params.Next | absLangURL }}>{{ i18n "next" }}</a>
+ {{ else }}
+ {{ $pathSectionsNext := split .Params.Next "/" }}
+ {{if eq (len $pathSectionsNext) 3}}
+ {{ if .Params.isIndex }}
+ {{ $book := index $pathSectionsNext 1 }}
+ {{ $path := index $pathSectionsNext 2 }}
+ <a href=../{{ $book }}/{{ $path }}/index.html>{{ i18n "next" }}</a>
+ {{ else }}
+ {{ $path := index $pathSectionsNext 2 }}
+ <a href=../{{ $path }}/index.html>{{ i18n "next" }}</a>
+ {{ end }}
+ {{ end }}
+ {{if eq (len $pathSectionsNext) 2}}
+ <a href=../index.html>{{ i18n "next" }}</a>
+ {{ end }}
+ {{ end }}
{{ end }}
</div>
</div>
diff --git a/documentation/themes/beastie/layouts/books/single.html b/documentation/themes/beastie/layouts/books/single.html
--- a/documentation/themes/beastie/layouts/books/single.html
+++ b/documentation/themes/beastie/layouts/books/single.html
@@ -3,7 +3,19 @@
<div class="navheader">
<div class="prev">
{{ if .Params.prev }}
- <a href={{ .Params.Prev | absLangURL }}>{{ i18n "prev" }}</a>
+ {{ if $.Site.Params.isOnline }}
+ <a href={{ .Params.Prev | absLangURL }}>{{ i18n "prev" }}</a>
+ {{ else }}
+ {{ $pathSectionsPrev := split .Params.Prev "/" }}
+
+ {{if eq (len $pathSectionsPrev) 3}}
+ {{ $path := index $pathSectionsPrev 2 }}
+ <a href=../{{ $path }}/index.html>{{ i18n "prev" }}</a>
+ {{ end }}
+ {{if eq (len $pathSectionsPrev) 2}}
+ <a href=../index.html>{{ i18n "prev" }}</a>
+ {{ end }}
+ {{ end }}
{{ end }}
</div>
<div class="chapter">
@@ -14,7 +26,24 @@
</div>
<div class="next">
{{ if .Params.next }}
+ {{ if $.Site.Params.isOnline }}
<a href={{ .Params.Next | absLangURL }}>{{ i18n "next" }}</a>
+ {{ else }}
+ {{ $pathSectionsNext := split .Params.Next "/" }}
+ {{if eq (len $pathSectionsNext) 3}}
+ {{ if .Params.isIndex }}
+ {{ $book := index $pathSectionsNext 1 }}
+ {{ $path := index $pathSectionsNext 2 }}
+ <a href=../{{ $book }}/{{ $path }}/index.html>{{ i18n "next" }}</a>
+ {{ else }}
+ {{ $path := index $pathSectionsNext 2 }}
+ <a href=../{{ $path }}/index.html>{{ i18n "next" }}</a>
+ {{ end }}
+ {{ end }}
+ {{if eq (len $pathSectionsNext) 2}}
+ <a href=../index.html>{{ i18n "next" }}</a>
+ {{ end }}
+ {{ end }}
{{ end }}
</div>
</div>
@@ -82,12 +111,12 @@
{{ i18n "last-modified" }} {{ index $releaseInfo 3 }} {{ $hour }} {{ i18n "by" }} {{ index $releaseInfo 5 }}.
{{ end }}
</div>
-{{ if .Params.add_split_page_link }}
+{{ if and (.Params.add_split_page_link) ($.Site.Params.isOnline) }}
<div>
[ <a href="../">Split HTML</a> / Single HTML ]
</div>
{{ end }}
-{{ if .Params.add_single_page_link }}
+{{ if and (.Params.add_single_page_link) ($.Site.Params.isOnline) }}
<div>
[ Split HTML / <a href="book/">Single HTML</a> ]
</div>
@@ -97,7 +126,19 @@
<div class="navfooter">
<div class="prev">
{{ if .Params.prev }}
- <a href={{ .Params.Prev | absLangURL }}>{{ i18n "prev" }}</a>
+ {{ if $.Site.Params.isOnline }}
+ <a href={{ .Params.Prev | absLangURL }}>{{ i18n "prev" }}</a>
+ {{ else }}
+ {{ $pathSectionsPrev := split .Params.Prev "/" }}
+
+ {{if eq (len $pathSectionsPrev) 3}}
+ {{ $path := index $pathSectionsPrev 2 }}
+ <a href=../{{ $path }}/index.html>{{ i18n "prev" }}</a>
+ {{ end }}
+ {{if eq (len $pathSectionsPrev) 2}}
+ <a href=../index.html>{{ i18n "prev" }}</a>
+ {{ end }}
+ {{ end }}
{{ end }}
</div>
<div class="home">
@@ -105,7 +146,24 @@
</div>
<div class="next">
{{ if .Params.next }}
+ {{ if $.Site.Params.isOnline }}
<a href={{ .Params.Next | absLangURL }}>{{ i18n "next" }}</a>
+ {{ else }}
+ {{ $pathSectionsNext := split .Params.Next "/" }}
+ {{if eq (len $pathSectionsNext) 3}}
+ {{ if .Params.isIndex }}
+ {{ $book := index $pathSectionsNext 1 }}
+ {{ $path := index $pathSectionsNext 2 }}
+ <a href=../{{ $book }}/{{ $path }}/index.html>{{ i18n "next" }}</a>
+ {{ else }}
+ {{ $path := index $pathSectionsNext 2 }}
+ <a href=../{{ $path }}/index.html>{{ i18n "next" }}</a>
+ {{ end }}
+ {{ end }}
+ {{if eq (len $pathSectionsNext) 2}}
+ <a href=../index.html>{{ i18n "next" }}</a>
+ {{ end }}
+ {{ end }}
{{ end }}
</div>
</div>
diff --git a/documentation/tools/books-toc-creator.py b/documentation/tools/books-toc-creator.py
--- a/documentation/tools/books-toc-creator.py
+++ b/documentation/tools/books-toc-creator.py
@@ -126,17 +126,20 @@
def main(argv):
justPrintOutput = False
+ offline = False
langargs = []
try:
- opts, args = getopt.gnu_getopt(argv,"hl:o",["language="])
+ opts, args = getopt.gnu_getopt(argv,"hl:o:p",["language="])
except getopt.GetoptError:
- print('books-toc-creator.py [-o] -l <language>')
+ print('books-toc-creator.py [-o] [-p] -l <language>')
sys.exit(2)
for opt, arg in opts:
if opt == '-h':
- print('books-toc-creator.py [-o] -l <language>')
+ print('books-toc-creator.py [-o] [-p] -l <language>')
sys.exit()
elif opt == '-o':
+ offline = True
+ elif opt == '-p':
justPrintOutput = True
elif opt in ("-l", "--language"):
langargs = arg.replace(" ",",").split(',')
@@ -175,7 +178,10 @@
with open('./content/{0}/books/{1}/{2}'.format(language, book, chapter), 'r', encoding = 'utf-8') as chapterFile:
chapterContent = chapterFile.read().splitlines()
chapterFile.close()
- chapter = chapter.replace("/_index.adoc", "").replace(".adoc", "")
+ if offline:
+ chapter = chapter.replace("/_index.adoc", "/index.html").replace(".adoc", ".html")
+ else:
+ chapter = chapter.replace("/_index.adoc", "").replace(".adoc", "")
if checkIsPart(chapter):
for lineNumber, chapterLine in enumerate(chapterContent, 1):
@@ -197,7 +203,7 @@
toc += "** link:{0}[{1} {2}]\n".format(chapter, setAppendixTitle(language), chapterLine.replace("=", "").strip())
elif re.match(r"^={2} [^\n]+", chapterLine):
- toc += "*** link:{0}/#{1}[{2}]\n".format(chapter, chapterContent[lineNumber-2].replace("[[", "").replace("]]", ""), chapterLine.replace("==", "").lstrip())
+ toc += "*** link:{0}#{1}[{2}]\n".format(chapter, chapterContent[lineNumber-2].replace("[[", "").replace("]]", ""), chapterLine.replace("==", "").lstrip())
else: # Normal chapter
for lineNumber, chapterLine in enumerate(chapterContent, 1):
@@ -206,7 +212,7 @@
toc += "** link:{0}[{1} {2}. {3}]\n".format(chapter, setChapterTitle(language), chapterCounter, chapterLine.replace("=", "").strip())
elif re.match(r"^={2} [^\n]+", chapterLine):
- toc += "*** link:{0}/#{1}[{2}.{3}. {4}]\n".format(chapter, chapterContent[lineNumber-2].replace("[[", "").replace("]]", ""), chapterCounter, subChapterCounter, chapterLine.replace("==", "").lstrip())
+ toc += "*** link:{0}#{1}[{2}.{3}. {4}]\n".format(chapter, chapterContent[lineNumber-2].replace("[[", "").replace("]]", ""), chapterCounter, subChapterCounter, chapterLine.replace("==", "").lstrip())
subChapterCounter += 1
chapterCounter += 1
diff --git a/documentation/tools/books-toc-examples-creator.py b/documentation/tools/books-toc-examples-creator.py
--- a/documentation/tools/books-toc-examples-creator.py
+++ b/documentation/tools/books-toc-examples-creator.py
@@ -57,17 +57,20 @@
def main(argv):
justPrintOutput = False
+ offline = False
langargs = []
try:
- opts, args = getopt.gnu_getopt(argv,"hl:o",["language="])
+ opts, args = getopt.gnu_getopt(argv,"hl:o:p",["language="])
except getopt.GetoptError:
- print('books-toc-examples-creator.py [-o] -l <language>')
+ print('books-toc-examples-creator.py [-o] [-p] -l <language>')
sys.exit(2)
for opt, arg in opts:
if opt == '-h':
- print('books-toc-examples-creator.py [-o] -l <language>')
+ print('books-toc-examples-creator.py [-o] [-p] -l <language>')
sys.exit()
if opt == '-o':
+ offline = True
+ if opt == '-p':
justPrintOutput = True
elif opt in ("-l", "--language"):
langargs = arg.replace(" ",",").split(',')
@@ -105,7 +108,11 @@
with open('./content/{0}/books/{1}/{2}'.format(language, book, chapter), 'r', encoding = 'utf-8') as chapterFile:
chapterContent = chapterFile.read().splitlines()
chapterFile.close()
- chapter = chapter.replace("/_index.adoc", "").replace(".adoc", "").replace("/chapter.adoc", "")
+
+ if offline:
+ chapter = chapter.replace("/_index.adoc", "/index.html").replace(".adoc", ".html").replace("/chapter.adoc", "/index.html")
+ else:
+ chapter = chapter.replace("/_index.adoc", "").replace(".adoc", "").replace("/chapter.adoc", "")
exampleId = ""
exampleTitle = ""
diff --git a/documentation/tools/books-toc-figures-creator.py b/documentation/tools/books-toc-figures-creator.py
--- a/documentation/tools/books-toc-figures-creator.py
+++ b/documentation/tools/books-toc-figures-creator.py
@@ -55,19 +55,22 @@
return languages.get(language)
def main(argv):
-
+
+ offline = False
justPrintOutput = False
langargs = []
try:
- opts, args = getopt.gnu_getopt(argv,"hl:o",["language="])
+ opts, args = getopt.gnu_getopt(argv,"hl:o:p",["language="])
except getopt.GetoptError:
- print('books-toc-figures-creator.py [-o] -l <language>')
+ print('books-toc-figures-creator.py [-o] [-p] -l <language>')
sys.exit(2)
for opt, arg in opts:
if opt == '-h':
- print('books-toc-figures-creator.py [-o] -l <language>')
+ print('books-toc-figures-creator.py [-o] [-p] -l <language>')
sys.exit()
if opt == '-o':
+ offline = True
+ if opt == '-p':
justPrintOutput = True
elif opt in ("-l", "--language"):
langargs = arg.replace(" ",",").split(',')
@@ -105,7 +108,11 @@
with open('./content/{0}/books/{1}/{2}'.format(language, book, chapter), 'r', encoding = 'utf-8') as chapterFile:
chapterContent = chapterFile.read().splitlines()
chapterFile.close()
- chapter = chapter.replace("/_index.adoc", "").replace(".adoc", "").replace("/chapter.adoc", "")
+
+ if offline:
+ chapter = chapter.replace("/_index.adoc", "/index.html").replace(".adoc", ".html").replace("/chapter.adoc", "/index.html")
+ else:
+ chapter = chapter.replace("/_index.adoc", "").replace(".adoc", "").replace("/chapter.adoc", "")
figureId = ""
figureTitle = ""
diff --git a/documentation/tools/books-toc-parts-creator.py b/documentation/tools/books-toc-parts-creator.py
--- a/documentation/tools/books-toc-parts-creator.py
+++ b/documentation/tools/books-toc-parts-creator.py
@@ -121,18 +121,21 @@
def main(argv):
global justPrintOutput
+ offline = False
justPrintOutput = False
langargs=[]
try:
- opts, args = getopt.gnu_getopt(argv,"hl:o",["language="])
+ opts, args = getopt.gnu_getopt(argv,"hl:o:p",["language="])
except getopt.GetoptError:
- print('books-toc-creator.py [-o] -l <language>')
+ print('books-toc-creator.py [-o] [-p] -l <language>')
sys.exit(2)
for opt, arg in opts:
if opt == '-h':
- print('books-toc-creator.py [-o] -l <language>')
+ print('books-toc-creator.py [-o] [-p] -l <language>')
sys.exit()
elif opt == '-o':
+ offline = True
+ elif opt == '-p':
justPrintOutput = True
elif opt in ("-l", "--language"):
langargs = arg.replace(" ",",").split(',')
@@ -165,7 +168,11 @@
with open('./content/{0}/books/{1}/{2}'.format(language, book, chapter), 'r', encoding = 'utf-8') as chapterFile:
chapterContent = chapterFile.read().splitlines()
chapterFile.close()
- chapter = chapter.replace("/_index.adoc", "").replace(".adoc", "")
+
+ if offline:
+ chapter = chapter.replace("/_index.adoc", "/index.html").replace(".adoc", ".html")
+ else:
+ chapter = chapter.replace("/_index.adoc", "").replace(".adoc", "")
if checkIsPart(chapter):
@@ -186,7 +193,7 @@
toc += "* link:../{0}[{1} {2}]\n".format(chapter, setAppendixTitle(language), chapterLine.replace("=", "").strip())
elif (re.match(r"^={2} [^\n]+", chapterLine)):
- toc += "** link:../{0}/#{1}[{2}]\n".format(chapter, chapterContent[lineNumber-2].replace("[[", "").replace("]]", ""), chapterLine.replace("==", "").lstrip())
+ toc += "** link:../{0}#{1}[{2}]\n".format(chapter, chapterContent[lineNumber-2].replace("[[", "").replace("]]", ""), chapterLine.replace("==", "").lstrip())
else:
for lineNumber, chapterLine in enumerate(chapterContent, 1):
@@ -195,7 +202,7 @@
toc += "* link:../{0}[{1} {2}. {3}]\n".format(chapter, setChapterTitle(language), chapterCounter, chapterLine.replace("=", "").strip())
elif re.match(r"^={2} [^\n]+", chapterLine):
- toc += "** link:../{0}/#{1}[{2}.{3}. {4}]\n".format(chapter, chapterContent[lineNumber-2].replace("[[", "").replace("]]", ""), chapterCounter, subChapterCounter, chapterLine.replace("==", "").lstrip())
+ toc += "** link:../{0}#{1}[{2}.{3}. {4}]\n".format(chapter, chapterContent[lineNumber-2].replace("[[", "").replace("]]", ""), chapterCounter, subChapterCounter, chapterLine.replace("==", "").lstrip())
subChapterCounter += 1
chapterCounter += 1
diff --git a/documentation/tools/books-toc-tables-creator.py b/documentation/tools/books-toc-tables-creator.py
--- a/documentation/tools/books-toc-tables-creator.py
+++ b/documentation/tools/books-toc-tables-creator.py
@@ -55,18 +55,21 @@
def main(argv):
+ offline = False
justPrintOutput = False
langargs= []
try:
- opts, args = getopt.gnu_getopt(argv,"hl:o",["language="])
+ opts, args = getopt.gnu_getopt(argv,"hl:o:p",["language="])
except getopt.GetoptError:
- print('books-toc-tables-creator.py [-o] -l <language>')
+ print('books-toc-tables-creator.py [-o] [-p] -l <language>')
sys.exit(2)
for opt, arg in opts:
if opt == '-h':
- print('books-toc-tables-creator.py [-o] -l <language>')
+ print('books-toc-tables-creator.py [-o] [-p] -l <language>')
sys.exit()
if opt == '-o':
+ offline = True
+ if opt == '-p':
justPrintOutput = True
elif opt in ("-l", "--language"):
langargs = arg.replace(" ",",").split(',')
@@ -104,7 +107,11 @@
with open('./content/{0}/books/{1}/{2}'.format(language, book, chapter), 'r', encoding = 'utf-8') as chapterFile:
chapterContent = chapterFile.read().splitlines()
chapterFile.close()
- chapter = chapter.replace("/_index.adoc", "").replace(".adoc", "").replace("/chapter.adoc", "")
+
+ if offline:
+ chapter = chapter.replace("/_index.adoc", "/index.html").replace(".adoc", ".html").replace("/chapter.adoc", "/index.html")
+ else:
+ chapter = chapter.replace("/_index.adoc", "").replace(".adoc", "").replace("/chapter.adoc", "")
tableId = ""
tableTitle = ""
diff --git a/shared/lib/InterDocumentReferencesMacro/extension.rb b/shared/lib/InterDocumentReferencesMacro/extension.rb
--- a/shared/lib/InterDocumentReferencesMacro/extension.rb
+++ b/shared/lib/InterDocumentReferencesMacro/extension.rb
@@ -12,12 +12,21 @@
destination = target
anchor = attrs[1]
text = attrs[2]
-
+
doc = parent.document
+
if doc.attributes['book'] == 'True'
+ if doc.attributes['isonline'] == 1
(create_anchor parent, text, type: :link, target: %(./##{anchor})).render
+ else
+ (create_anchor parent, text, type: :link, target: %(./index.html##{anchor})).render
+ end
else
+ if doc.attributes['isonline'] == 1
(create_anchor parent, text, type: :link, target: %(../#{destination}/##{anchor})).render
+ else
+ (create_anchor parent, text, type: :link, target: %(../#{destination}/index.html##{anchor})).render
+ end
end
end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 28, 2:48 PM (38 m, 58 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33588047
Default Alt Text
D31926.id95022.diff (66 KB)
Attached To
Mode
D31926: Build offline documentation using Hugo
Attached
Detach File
Event Timeline
Log In to Comment