diff --git a/documentation/Makefile b/documentation/Makefile index 628b84edc3..ac2738450d 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -1,272 +1,272 @@ # Generate the FreeBSD documentation # -# Copyright (c) 2020-2021, The FreeBSD Documentation Project -# Copyright (c) 2020-2021, Sergio Carlavilla +# Copyright (c) 2020-2022, The FreeBSD Documentation Project +# Copyright (c) 2020-2022, Sergio Carlavilla # # Targets intended for use on the command line # # all (default) - generate the books TOC and compile all the documentation # clean - removes generated files # run - serves the built documentation site for local browsing # pdf - build PDF versions of the articles and books. # html - build HTML versions of the articles and books for # offline use. # If variable DOC_HTML_ARCHIVE is set, all documents will be # archived/compressed, and only these files will be kept in the public # directory. # epub - build EPUB versions of the articles and books (Experimental). # # 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 # List of languages without book translations ARTICLEONLY_LANGS= bn-bd da ko tr # List of languages without article translations BOOKONLY_LANGS= mn # List of all languages we have content for ALL_LANGUAGES= bn-bd da de el en es fr hu it ja ko mn nl pl pt-br ru tr zh-cn zh-tw LOCALBASE?= /usr/local 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 .if defined(DOC_LANG) && !empty(DOC_LANG) LANGUAGES= ${DOC_LANG:S/,/ /g} .if ${LANGUAGES:Men} == "" && ${.TARGETS:Mpdf*} == "" && ${.TARGETS:Mhtml*} == "" .warning "Warning: cannot skip 'en'; adding it back" LANGUAGES+= en .endif .else LANGUAGES= ${ALL_LANGUAGES} .endif RUBYLIB = ../shared/lib .export RUBYLIB RUN_DEPENDS= ${HUGO_CMD} \ ${LOCALBASE}/bin/asciidoctor \ ${LOCALBASE}/bin/rougify .ifndef HOSTNAME . ifdef BIND .HOST=$(BIND) . else .HOST=localhost . endif .else .HOST=$(HOSTNAME) .endif # Strip the languages with only articles from the list of languages we # will use to build books. BOOK_LANGS= ${LANGUAGES} .for a in ${ARTICLEONLY_LANGS} BOOK_LANGS:= ${BOOK_LANGS:N${a}} .endfor # Strip the languages with only books from the list of languages we # will use to build articles. ARTICLE_LANGS= ${LANGUAGES} .for a in ${BOOKONLY_LANGS} ARTICLE_LANGS:= ${ARTICLE_LANGS:N${a}} .endfor # Take the list of all languages, and take out the ones we have been # asked for. We'll feed this to hugo. SKIP_LANGS= .for a in ${ALL_LANGUAGES} .if ${LANGUAGES:M${a}} == "" SKIP_LANGS+= ${a} .endif .endfor .ORDER: all run .ORDER: requirements .ORDER: starting-message .ORDER: starting-message build .ORDER: build all: requirements starting-message generate-pgpkeys-txt build run: requirements starting-message generate-pgpkeys-txt run-local # clean does not call pdf-clean as that is a subset of hugo-clean clean: hugo-clean pgp-clean requirements: .for dep in ${RUN_DEPENDS} .if !exists(${dep}) @(echo ${dep} not found, please run 'pkg install docproj'; exit 1) .endif .endfor requirements-pdf: .if !exists(${LOCALBASE}/bin/asciidoctor-pdf) @(echo ${LOCALBASE}/bin/asciidoctor-pdf not found, please run 'pkg install rubygem-asciidoctor-pdf'; exit 1) .endif requirements-epub: .if !exists(${LOCALBASE}/bin/asciidoctor-epub3) @(echo ${LOCALBASE}/bin/asciidoctor-epub3 not found, please run 'pkg install rubygem-asciidoctor-epub3'; exit 1) .endif starting-message: .PHONY @echo --------------------------------------------------------------- @echo Building the documentation @echo included languages: ${LANGUAGES} @echo excluded languages: ${SKIP_LANGS} @echo --------------------------------------------------------------- generate-pgpkeys-txt: static/pgpkeys/pgpkeys.txt static/pgpkeys/pgpkeys.txt: static/pgpkeys/*key ${RUBY_CMD} ./tools/global-pgpkeys-creator.rb run-local: .PHONY HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} server \ ${HUGO_ARGS} -D $(BIND:D--bind=$(BIND)) --baseURL="http://$(.HOST):1313" build: .PHONY HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} ${HUGO_ARGS} build-offline: .PHONY HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} ${HUGO_OFFLINE_ARGS} pgp-clean: .PHONY rm -f static/pgpkeys/pgpkeys.txt hugo-clean: .PHONY rm -rf resources public # # PDF targets # Use DOC_LANG to choose the language, e.g., make DOC_LANG="en fr" pdf-books # pdf: pdf-articles pdf-books pdf-books: requirements-pdf .for _lang in ${BOOK_LANGS} ./tools/asciidoctor.sh books ${_lang} pdf .endfor pdf-articles: requirements-pdf .for _lang in ${ARTICLE_LANGS} ./tools/asciidoctor.sh articles ${_lang} pdf .endfor pdf-clean: pdf-articles-clean pdf-books-clean pdf-books-clean: .for _lang in ${BOOK_LANGS} rm -fr ${.CURDIR}/public/${_lang}/books -rmdir ${.CURDIR}/public/${_lang} .endfor -rmdir ${.CURDIR}/public/ pdf-articles-clean: .for _lang in ${ARTICLE_LANGS} rm -fr ${.CURDIR}/public/${_lang}/articles .if !exists(${.CURDIR}/public/${_lang}/books) rm -fr ${.CURDIR}/public/${_lang} .endif .endfor -rmdir ${.CURDIR}/public # # HTML targets # html: build-offline html-clean-global html-clean-articles html-clean-books html-archive html-archive-clean-files html-clean: hugo-clean html-clean-global: rm -fr ${.CURDIR}/public/index.html rm -rf pgpkeys js html-clean-articles: .for _lang in ${ARTICLE_LANGS} rm -fr ${.CURDIR}/public/${_lang}/index.html rm -fr ${.CURDIR}/public/${_lang}/articles/index.html .endfor html-clean-books: .for _lang in ${BOOK_LANGS} rm -fr ${.CURDIR}/public/${_lang}/books/index.html .endfor html-archive: .if defined(DOC_HTML_ARCHIVE) .for _lang in ${ARTICLE_LANGS} ./tools/asciidoctor.sh articles ${_lang} archive .endfor .for _lang in ${BOOK_LANGS} ./tools/asciidoctor.sh books ${_lang} archive .endfor .endif html-archive-clean-files: .if defined(DOC_HTML_ARCHIVE) find ${.CURDIR}/public/ ! -name '*.pdf' ! -name '*.tar.gz' -type f -delete find ${.CURDIR}/public/ -type d -empty -delete .endif # # EPUB targets # Use DOC_LANG to choose the language, e.g., make DOC_LANG="en fr" epub-books # epub: epub-articles epub-books epub-books: requirements-epub @echo --------------------------------------------------------------- @echo !!! EPUB output is experimental !!! @echo @echo Asciidoctor EPUB3 is currently alpha software. Use accordingly. Although the @echo bulk of AsciiDoc content is converted, there’s still work needed to fill in @echo gaps where conversion is incomplete or unstyled. @echo https://docs.asciidoctor.org/epub3-converter/latest/#project-status @echo --------------------------------------------------------------- .for _lang in ${BOOK_LANGS} ./tools/asciidoctor.sh books ${_lang} epub .endfor epub-articles: requirements-epub @echo --------------------------------------------------------------- @echo !!! EPUB output is experimental !!! @echo @echo Asciidoctor EPUB3 is currently alpha software. Use accordingly. Although the @echo bulk of AsciiDoc content is converted, there’s still work needed to fill in @echo gaps where conversion is incomplete or unstyled. @echo https://docs.asciidoctor.org/epub3-converter/latest/#project-status @echo --------------------------------------------------------------- .for _lang in ${ARTICLE_LANGS} ./tools/asciidoctor.sh articles ${_lang} epub .endfor epub-clean: epub-articles-clean epub-books-clean epub-books-clean: .for _lang in ${BOOK_LANGS} rm -fr ${.CURDIR}/public/${_lang}/books -rmdir ${.CURDIR}/public/${_lang} .endfor -rmdir ${.CURDIR}/public/ epub-articles-clean: .for _lang in ${ARTICLE_LANGS} rm -fr ${.CURDIR}/public/${_lang}/articles .if !exists(${.CURDIR}/public/${_lang}/books) rm -fr ${.CURDIR}/public/${_lang} .endif .endfor -rmdir ${.CURDIR}/public diff --git a/documentation/themes/beastie/LICENSE b/documentation/themes/beastie/LICENSE index 8b1e6da482..e94c3e41c7 100644 --- a/documentation/themes/beastie/LICENSE +++ b/documentation/themes/beastie/LICENSE @@ -1,23 +1,23 @@ -Copyright (c) 2020-2021, The FreeBSD Project -Copyright (c) 2020-2021, Sergio Carlavilla +Copyright (c) 2020-2022, The FreeBSD Project +Copyright (c) 2020-2022, Sergio Carlavilla Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/documentation/themes/beastie/assets/styles/documentation.scss b/documentation/themes/beastie/assets/styles/documentation.scss index cdbfbda0ec..63fb4e03a9 100644 --- a/documentation/themes/beastie/assets/styles/documentation.scss +++ b/documentation/themes/beastie/assets/styles/documentation.scss @@ -1,376 +1,376 @@ /* - * Copyright (c) 2001-2021, The FreeBSD Documentation Project - * Copyright (c) 2021, Sergio Carlavilla + * Copyright (c) 2001-2022, The FreeBSD Documentation Project + * Copyright (c) 2021-2022, Sergio Carlavilla * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ .articles-books-list { list-style: none; padding-left: 10px; li { a { text-decoration: none; font-weight: bolder; color: var(--global-font); } p { margin-top: 0px; } } } .main-wrapper-article { display: flex; margin-top: var(--header-height); .article { flex-grow: 1; padding: var(--documentation-padding); width: 90vw; width: clamp(16rem, 90vw, 70rem); min-width: 20rem; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; transition: .2s ease-in-out; } } .main-wrapper-book { display: flex; margin-top: var(--header-height); .book-menu { flex: 0 0 16rem; font-size: .75rem; background-color: var(--global-background-color); .book-menu-content { width: 16rem; position: sticky; top: var(--header-height); bottom: 0; overflow-x: hidden; overflow-y: auto; background-color: var(--global-background-color); transition: .2s ease-in-out; h3 { margin: 1rem 0; border-bottom: none; padding-left: .5rem; } input.toggle ~ .icon::after { display: inline-block; font: 1rem FontAwesome; text-rendering: auto; content: "\f105"; } input.toggle:checked ~ .icon::after { display: inline-block; font: 1rem FontAwesome; text-rendering: auto; content: "\f107"; } input.toggle ~ ul { display:none } input.toggle:checked ~ ul { display:block } #MenuContents { position: sticky; overflow: auto; max-height: calc(90vh); ul { margin: 0 0 0 .75rem; padding: 0; li { list-style: none; margin: 0; label { position: absolute; cursor: pointer; } a { color: var(--global-font-color); display: block; padding-left: 1rem; } } } } } } .book { flex-grow: 1; padding: var(--documentation-padding); width: 90vw; min-width: 20rem; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; transition-duration: 0.2s; background-color: var(--global-background-color); h1 { margin: .8rem 0; } .book-menu-mobile { margin-top: 10px; .menu-control-button { border-radius: 2px; cursor: pointer; font-weight: 500; padding: 5px; border: 1px solid var(--lines-color); i { padding-right: 5px; } } } .buttons { display: flex; .prev, .home, .next { display: flex; flex-direction: row; align-items: center; i { padding: 1rem; } } .home { i { padding-left: .2rem; padding-right: .2rem; } } .home, .next { margin-left: auto; } .container { display: flex; flex-direction: column; .direction { font-weight: bolder; } } } } } .toc { flex: 0 0 16rem; font-size: .75rem; background-color: var(--global-background-color); .toc-content { width: 16rem; position: sticky; top: var(--header-height); bottom: 0; overflow-x: hidden; overflow-y: auto; transition: .2s ease-in-out; h3 { border-bottom: none; margin: 1rem 0; } #TableOfContents { position: sticky; overflow: auto; max-height: 60vh; ul { margin: 0; padding: 0; li { margin: 0; list-style: none; a { color: var(--global-font-color); display: inline-block; padding: .25rem 0 .25rem .5rem; margin-left: .5rem; text-decoration: none; i { margin-right: .5rem; } &:hover { font-weight: 500; } } } } } .resources { h3 { margin: 1rem 0; } ul { margin: 0; padding: 0; li { list-style: none; margin: 0; a { color: var(--global-font-color); display: inline-block; padding: .25rem 0 .25rem .5rem; } i { margin-left: 1rem; } } } } } } .toc-mobile { h3 { border-bottom: none; } #TableOfContents, .resources { ul { list-style: none; margin: 0; padding: 0; li { margin: 0; a { color: var(--global-font-color); display: inline-block; padding: .25rem 0 .25rem .5rem; text-decoration: none; border-left: 1px solid var(--lines-color); &:hover { font-weight: bolder; } } } } } } .hidden { display: none; } input.toggle { height: 0; width: 0; overflow: hidden; opacity: 0; position: absolute; } @media (max-width: 55em) { .toc { display: none; } #menu-control { display: inline; } .book-menu { visibility: hidden; margin-inline-start: -16rem; z-index: 1; } #menu-control:checked ~ main { .book-menu { visibility: initial; } .book-menu .book-menu-content { transform: translateX(16rem); box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.1); } .book { opacity: 0.25; } .book-menu-overlay { display: block; position: absolute; top: 0; bottom: 0; left: 0; right: 0; } } } @media (min-width: 55em) { .toc-mobile, .book-menu-mobile { display: none; } } diff --git a/documentation/themes/beastie/assets/styles/footer.scss b/documentation/themes/beastie/assets/styles/footer.scss index 6860444650..1a90d44669 100644 --- a/documentation/themes/beastie/assets/styles/footer.scss +++ b/documentation/themes/beastie/assets/styles/footer.scss @@ -1,164 +1,164 @@ /* - * Copyright (c) 2001-2021, The FreeBSD Documentation Project - * Copyright (c) 2021, Sergio Carlavilla + * Copyright (c) 2001-2022, The FreeBSD Documentation Project + * Copyright (c) 2021-2022, Sergio Carlavilla * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ footer { display: flex; flex-flow: row wrap; padding: 30px 20px 20px 20px; color: var(--global-font-color); background-color: var(--footer-background); border-top: 1px solid var(--footer-border-color); align-items: center; - + > * { flex: 1 100%; } - + .footer-project-language { margin-right: 1.25em; margin-bottom: 2em; - + h1 { font-weight: bolder; font-size: 1.5rem; } - + .options-container { display: flex; align-items: center; - + .theme-container { margin-left: 2rem; } - + .language-container { display: flex; align-items: center; a { display: flex; align-items: center; text-decoration: none; color: var(--global-font-color); border-radius: 1px; padding: .3rem; img { display: inline-flex; padding-right: 10px; align-items: center; justify-content: center; height: 1.5rem; width: 1.5rem; } } } - + } } - + .footer-nav { display: flex; list-style: none; margin: 0; padding: 0; - + > * { flex: 1 50%; margin-right: 1.25em; } .title { font-weight: bolder; font-size: 15px; border-bottom: 1px solid var(--white); } - + h2 { border: none !important; } - + ul { list-style: none; padding-left: 0; - + li { line-height: 2em; - + a { text-decoration: none; color: var(--global-font-color); } } } } - + .copyright { display: flex; flex-wrap: wrap; color: var(--global-font-color); - + .love { display: flex; align-items: center; font-weight: bolder; - + .heart { color: red; } } } - + } @media screen and (min-width: 24rem) { .copyright .love { margin-left: auto; } } @media screen and (min-width: 40rem) { .footer-project-language { flex: 1 0px; } - + .footer-nav > * { flex: 1; } .footer-nav { flex: 2 0px; } } @media screen and (max-width: 41rem) { .footer-nav { display: block !important; } } diff --git a/documentation/themes/beastie/assets/styles/global.scss b/documentation/themes/beastie/assets/styles/global.scss index c1fff32b9b..983e4d677c 100644 --- a/documentation/themes/beastie/assets/styles/global.scss +++ b/documentation/themes/beastie/assets/styles/global.scss @@ -1,732 +1,732 @@ /* - * Copyright (c) 2001-2021, The FreeBSD Documentation Project - * Copyright (c) 2021, Sergio Carlavilla + * Copyright (c) 2001-2022, The FreeBSD Documentation Project + * Copyright (c) 2021-2022, Sergio Carlavilla * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ html { font-family: 'Inter', sans-serif; scroll-padding-top: var(--header-height); scroll-behavior: smooth; } @supports (font-variation-settings: normal) { html { font-family: 'Inter var', sans-serif; } } @supports (scrollbar-width:thin) { body * { scrollbar-width: thin; scrollbar-color: #D9D9D9 transparent; } } html, body { text-rendering: optimizeLegibility; line-height: calc(1ex / 0.32); } body { display: flex; flex-direction: column; color: var(--global-font-color); padding: 0; margin: 0; font-size: 16px; font-weight: 400; font-style: normal; cursor: auto; background-color: var(--global-background-color); } /* Main */ .main-wrapper { display: flex; flex-direction: column; padding: 0rem 2rem 2rem 2rem; margin-top: var(--header-height); transition: padding .15s; background-color: var(--global-background-color); .welcome-container { display: flex; width: 100%; margin-top: 2.5rem; text-align: center; align-items: center; flex-direction: column; .title-language-container { display: flex; width: 100%; justify-content: center; h2 { margin: 0; border-bottom: 0px; margin-left: auto; } a { margin-left: auto; img { display: inline-flex; padding-right: 10px; align-items: center; justify-content: center; height: 1.5rem; width: 1.5rem; } } } form { display: flex; width: 100%; background-color: var(--global-background-color); justify-content: center; input { display: block; width: 50%; padding: 10px 20px; border: 1px solid #ccc; border-radius: 4px; box-shadow: inset 0 1px 3px #ddd; box-sizing: border-box; } } } .cards-container { display: flex; flex-direction: column; justify-content: center; width: 100%; margin-top: 3rem; margin-bottom: 3rem; .row { display: flex; flex-direction: row; justify-content: center; width: 100%; margin-bottom: 2rem; .card { display: flex; flex: 280px 0; margin-left: 16px; padding: 24px; border: 1px solid var(--card-border-color); background-color: var(--card-background-color); a { display: flex; flex-direction: column; text-decoration: none; h5 { color: var(--global-font-color); font-weight: 700; font-size: 22px; margin: 0px 0px 8px 0px; border-bottom: 0px; } p { color: var(--global-font-color); font-size: 18px; margin: 0px; margin-top: auto; text-align: inherit; } } } } } } ul.language-list { display: flex; flex-wrap: wrap; list-style: none; li { flex: 1 0 25%; list-style-type: none; max-width: 25%; a { cursor: pointer; color: var(--global-font-color); } } .selected { font-weight: bolder; } } @media (max-width: 55em) { .main-wrapper { padding: 0rem 1rem 2rem 1rem; .welcome-container { margin-bottom: 2.5rem; form { input { width: 100%; background-color: var(--white); } } } .cards-container { display: block; width: 100%; margin: 0; padding: 0; .row { display: block; width: 100%; .card { display: block; width: 100%; margin: 0px; margin-bottom: 2rem; padding: 0px; a { display: flex; padding: 20px; min-height: 100px; } } } } } } @media (min-width: 1200px) { .main-wrapper { .cards-container { .row { .card { width: 33.3%; } } } } } @media (min-width: 768px) { .main-wrapper { .cards-container { .row { .card { width: 50%; } } } } } .abstract-title { font-size: 24px; font-weight: 700; } h1, h2, h3, h4 { line-height: 1.3; } h1, h2 { font-weight: 900; } h1 { font-size: var(--size-750); } h2 { font-size: var(--size-600); } h3 { font-size: var(--size-550); } h4 { font-size: var(--size-500); } h5 { font-size: var(--size-400); } h6 { font-size: var(--size-300); } h2, h3, h4, h5, h6 { border-bottom: 1px solid var(--lines-color); } h1 .anchor, h2 .anchor, h3 .anchor, h4 .anchor, h5 .anchor, h6 .anchor, h1 .link, h2 .link, h3 .link, h4 .link, h5 .link, h6 .link { text-decoration: none !important; color: var(--global-font-color); } h1 .anchor, h2 .anchor, h3 .anchor, h4 .anchor, h5 .anchor, h6 .anchor { visibility: hidden; font-weight: normal; margin-right: 5px; } h1 .anchor::before, h2 .anchor::before, h3 .anchor::before, h4 .anchor::before, h5 .anchor::before, h6 .anchor::before { content: "\00a7"; } h1:hover .anchor, h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, h5:hover .anchor, h6:hover .anchor { visibility: visible; font-weight: normal; margin-right: 5px; } hr { margin-top: 1rem; margin-bottom: 1rem; border: 0; border-top: 1px solid var(--lines-color); } a { text-decoration: none; color: var(--links-color); &:hover { text-decoration: underline; } } img { max-width: 100%; } .imageblock { .title { margin-top: .5rem; padding-bottom: 0; font-weight: bolder; font-style: italic; } } figcaption { font-size: var(--size-300); font-style: italic; margin-top: 1rem; } pre { border-radius: 0.25rem; font-family: monospace; background-color: var(--pre-background-color); font-size: 1rem; color: var(--pre-font-color); line-height: 1.4; margin: 0 0 24px; overflow: auto !important; padding: 1rem; margin: 0; } p { text-justify: inter-word; } b, dt, strong, th { font-weight: bolder; } dt { font-style: italic; } blockquote { padding-left: var(--size-600); border-left: 5px solid; font-style: italic; } .literalblock { margin: .75em 0; overflow: auto; .content { overflow: auto; } } /* callouts */ .conum { display: inline-block; color: #FFF !important; background-color: #000; border-radius: 100px; text-align: center; font-size: .75em; width: 1.67em; height: 1.67em; font-style: normal; font-weight: bold; } .conum[data-value] { color: #FFF !important; text-align: center; font-size: .75em; line-height: 1.67em; font-style: normal; font-weight: bold; } .conum[data-value]::after { content: attr(data-value); } .colist td { padding-top: 4px; padding-bottom: 4px; } .colist tr td b, .programlisting b { display: none; } .rouge b { display: none; } /* Tables */ table { caption { text-rendering: optimizeLegibility; text-align: left; font-weight: bolder; font-size: 1rem; } } table.tableblock { display: block; margin: auto; margin-bottom: 1.25em; max-width: 100%; border-collapse: collapse; overflow-x: auto; th { text-align: left; background-color: var(--table-header-background-color); text-rendering: optimizeLegibility; padding: .5em .625em .625em; border: 0 solid #DEDEDE; border-width: 0 1px 1px 0; } td { text-align: left; border: 0 solid #DEDEDE; text-rendering: optimizeLegibility; line-height: 1.6; padding: .5em .625em .625em; font-size: inherit; border-width: 0 1px 1px 0; } td.icon { border: none; } td:first-of-type, th:first-of-type { border-left: none; } td:last-of-type, th:last-of-type { border-right: none; } } table.stretch { width: 100%; } /* Admonitions */ .admonitionblock { margin: 1.4rem 0; padding: 1rem; color: var(--admonition-font-color); table { table-layout: fixed; position: relative; width: 100%; tbody { tr { td.icon { position: absolute; top: 0; left: 0; line-height: 1; padding-bottom: .5rem; i { display: inline-flex; align-items: center; width: auto; background-position-x: .5em; vertical-align: initial; font-style: normal; &:after { content: attr(title); font-weight: bolder; padding: 0 .5em; margin: -.05em; } } .icon-note::before { content:"\f05a"; color: var(--admonition-note-color); } .icon-tip::before { content:"\f0eb"; color: var(--admonition-tip-color) } .icon-warning::before { content:"\f071"; color: var(--admonition-warning-color); } .icon-caution::before { content:"\f06d"; color: var(--admonition-caution-color); } .icon-important::before { content:"\f06a"; color: var(--admonition-important-color); } } td.icon [class^="fa icon-"] { font-size: 1.2rem; cursor: default; } td.content { width: 100%; word-wrap: anywhere; .title { margin-top: 2rem; } .paragraph { padding-top: .5rem; } a { color: var(--admonition-links-color); } } } } } } .note { border-left: 5px solid var(--admonition-note-color); background-color: var(--admonition-note-background-color); } .warning { border-left: 5px solid var(--admonition-warning-color); background-color: var(--admonition-warning-background-color); } .important { border-left: 5px solid var(--admonition-important-color); background-color: var(--admonition-important-background-color); } .caution { border-left: 5px solid var(--admonition-caution-color); background-color: var(--admonition-caution-background-color); } .tip { border-left: 5px solid var(--admonition-tip-color); background-color: var(--admonition-tip-background-color); } /* Example */ .example, .exampleblock { border-left: 5px solid var(--example-block-color); padding: 1rem; background-color: var(--example-block-background-color); } .exampleblock { margin: .75rem 0; color: var(--example-block-font-color); .title { font-weight: bolder; } .content { .literalblock { .content{ background: #fefde6 !important; border: none !important; color: var(--global-font-color); } } a { color: var(--admonition-links-color); } } } .procedure { border-left: 5px solid #B3B3B3; padding: 1rem; margin-bottom: 1.4rem; } /* Misc */ .listingblock { margin: .75em 0; } code { font-family: "DejaVu Sans Mono", monospace; font-size: 0.75rem; } .filename { font-weight: bolder; } details { summary { cursor: pointer; } } kbd { font-family: "DejaVu Sans", "DejaVu Sans Bold"; display: inline-block; color: rgba(0,0,0,.8); font-size: .65em; line-height: 1.45; background-color: #F7F7F7; border: 1px solid #ccc; border-radius: 3px; box-shadow: 0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #FFF inset; margin: 0 .15em; padding: .2em .5em; vertical-align: middle; position: relative; top: -.1em; white-space: nowrap; } .to-top { opacity: 1; visibility: visible; transition: .2s; position: fixed; bottom: 1.2rem; right: 1.5rem; z-index: 15; text-decoration: none; i { font-size: 2rem; color: var(--global-font-color); } } diff --git a/documentation/themes/beastie/assets/styles/header.scss b/documentation/themes/beastie/assets/styles/header.scss index adb6dcf736..b0f724dda1 100644 --- a/documentation/themes/beastie/assets/styles/header.scss +++ b/documentation/themes/beastie/assets/styles/header.scss @@ -1,165 +1,165 @@ /* - * Copyright (c) 2001-2021, The FreeBSD Documentation Project - * Copyright (c) 2021, Sergio Carlavilla + * Copyright (c) 2001-2022, The FreeBSD Documentation Project + * Copyright (c) 2021-2022, Sergio Carlavilla * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ header { position: fixed; background-color: var(--header-background); box-shadow: 1px 1px 4px 0 rgba(0,0,0,.1); width: 100%; z-index: 9999; - + ul { margin: 0; padding: 0; list-style: none; overflow: hidden; background-color: var(--header-background); - + li { list-style: none; - + a { display: block; padding: 20px 20px; border-right: 1px solid var(--header-background); text-decoration: none; color: var(--header-font-color); font-weight: bolder; } } } - + .logo { display: block; float: left; font-size: 2em; padding: 10px 20px; text-decoration: none; } - + .menu { clear: both; max-height: 0; transition: max-height .2s ease-out; - + .first-element{ border-top: 1px solid transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.1); } } - + .menu-icon { cursor: pointer; display: inline-block; float: right; padding: 28px 20px; position: relative; user-select: none; margin-top: 5px; - + .navicon { background: var(--white); display: block; height: 2px; position: relative; transition: background .2s ease-out; width: 18px; } } } header li a:hover, header .menu-btn:hover { background-color: var(--header-background); } header .menu-icon .navicon:before, header .menu-icon .navicon:after { background: var(--white); content: ''; display: block; height: 100%; position: absolute; transition: all .2s ease-out; width: 100%; } header .menu-icon .navicon:before { top: 5px; } header .menu-icon .navicon:after { top: -5px; } header .menu-btn { display: none; } header .menu-btn:checked ~ .menu { max-height: 300px; } header .menu-btn:checked ~ .menu-icon .navicon { background: transparent; } header .menu-btn:checked ~ .menu-icon .navicon:before { transform: rotate(-45deg); } header .menu-btn:checked ~ .menu-icon .navicon:after { transform: rotate(45deg); } header .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:before, header .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:after { top: 0; } @media (min-width: 55em) { header li { float: left; list-style: none; } header li a { padding: 20px 30px; } header .menu { clear: none; float: right; max-height: none; } header .menu-icon { display: none; } } diff --git a/documentation/themes/beastie/assets/styles/main.scss b/documentation/themes/beastie/assets/styles/main.scss index 484587865e..8d3fdbb1c9 100644 --- a/documentation/themes/beastie/assets/styles/main.scss +++ b/documentation/themes/beastie/assets/styles/main.scss @@ -1,51 +1,51 @@ /* - * Copyright (c) 2001-2021, The FreeBSD Documentation Project - * Copyright (c) 2021, Sergio Carlavilla + * Copyright (c) 2001-2022, The FreeBSD Documentation Project + * Copyright (c) 2021-2022, Sergio Carlavilla * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ @font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter/Inter-Regular.woff2") format("woff2"), url("../fonts/inter/Inter-Regular.woff") format("woff"); } @font-face { font-family: 'Inter var'; font-weight: 100 900; font-display: swap; font-style: normal; font-named-instance: 'Regular'; src: url("../fonts/inter/Inter-roman.var.woff2") format("woff2"); } @import "variables"; @import "global"; @import "header"; @import "documentation"; @import "footer"; @import "rouge"; diff --git a/documentation/themes/beastie/assets/styles/variables.scss b/documentation/themes/beastie/assets/styles/variables.scss index 2e1a754752..cc027d10ba 100644 --- a/documentation/themes/beastie/assets/styles/variables.scss +++ b/documentation/themes/beastie/assets/styles/variables.scss @@ -1,146 +1,146 @@ /* - * Copyright (c) 2001-2021, The FreeBSD Documentation Project - * Copyright (c) 2021, Sergio Carlavilla + * Copyright (c) 2001-2022, The FreeBSD Documentation Project + * Copyright (c) 2021-2022, Sergio Carlavilla * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ :root { --header-height: 4.5rem; --documentation-padding: 0px 20px 20px 20px; --size-200: 0.50rem; --size-300: 0.75rem; --size-400: 1rem; --size-500: 1.33rem; --size-550: 1.55rem; --size-600: 1.77rem; --size-700: 2.30rem; --size-750: 2.40rem; --size-800: 3.15rem; --size-900: 4.2rem; --flow-space: var(--size-700); } .theme-light { --white: #FFF; --black: #000; --global-font-color: #444; --header-background: #9F0E0F; --header-font-color: #FFF; --global-background-color: #FCFCFD; --card-background-color: #F0F1F5; --card-border-color: #F0F1F5; --table-header-background-color: #F1F3F1; --footer-background: #F0F1F5; --footer-border-color: #F0F1F5; --lines-color: #E6ECF1; --links-color: #0645AD; --pre-background-color: #F4F4F4; --pre-font-color: #444; --admonition-font-color: #444; --admonition-links-color: #0645AD; --admonition-note-color: #19407C; --admonition-note-background-color: #EAF1FB; --admonition-warning-color: #BF6900; --admonition-warning-background-color: #FFF4E6; --admonition-important-color: #BF0000; --admonition-important-background-color: #FFE6E6; --admonition-caution-color: #BF3400; --admonition-caution-background-color: #FFECE6; --admonition-tip-color: #43B929; --admonition-tip-background-color: #EDFAEA; --example-block-color: #F1BB16; --example-block-background-color: #FEF8E7; --example-block-font-color: #444; } .theme-dark { --white: #FFF; --black: #000; --global-font-color: #EEEFF1; --header-background: #9F0E0F; --header-font-color: #EEEFF1; --global-background-color: #333333; --card-background-color: #272727; --card-border-color: #272727; --table-header-background-color: #F1F3F1; --footer-background: #2B2B2B; --footer-border-color: #2B2B2B; --lines-color: #4d4d4d; --links-color: #BAD7FF; --pre-background-color: #272727; --pre-font-color: #EEEFF1; --admonition-font-color: #444; --admonition-links-color: #1A79FF; --admonition-note-color: #19407C; --admonition-note-background-color: #EAF1FB; --admonition-warning-color: #BF6900; --admonition-warning-background-color: #FFF4E6; --admonition-important-color: #BF0000; --admonition-important-background-color: #FFE6E6; --admonition-caution-color: #BF3400; --admonition-caution-background-color: #FFECE6; --admonition-tip-color: #43B929; --admonition-tip-background-color: #EDFAEA; --example-block-color: #F1BB16; --example-block-background-color: #FEF8E7; --example-block-font-color: #272727; } .theme-high-contrast { --white: #FFF; --black: #000; --global-font-color: #FFF; --header-background: #9F0E0F; --header-font-color: #FFF; --global-background-color: #000; --card-background-color: #000; --card-border-color: #FFF; --table-header-background-color: #FFF; --footer-background: #000; --footer-border-color: #FFF; --lines-color: #FFF; --links-color: #9F0E0F; --pre-background-color: #FFF; --pre-font-color: #000; --admonition-font-color: #000; --admonition-note-color: #19407C; --admonition-links-color: #9F0E0F; --admonition-note-background-color: #EAF1FB; --admonition-warning-color: #BF6900; --admonition-warning-background-color: #FFF4E6; --admonition-important-color: #BF0000; --admonition-important-background-color: #FFE6E6; --admonition-caution-color: #BF3400; --admonition-caution-background-color: #FFECE6; --admonition-tip-color: #43B929; --admonition-tip-background-color: #EDFAEA; --example-block-color: #F1BB16; --example-block-background-color: #FEF8E7; --example-block-font-color: #000; } diff --git a/documentation/tools/global-pgpkeys-creator.rb b/documentation/tools/global-pgpkeys-creator.rb index 6f9dd3d08e..87fe29cc29 100644 --- a/documentation/tools/global-pgpkeys-creator.rb +++ b/documentation/tools/global-pgpkeys-creator.rb @@ -1,39 +1,39 @@ #!/usr/bin/env ruby =begin BSD 2-Clause License -Copyright (c) 2020-2021, The FreeBSD Project -Copyright (c) 2020-2021, Sergio Carlavilla +Copyright (c) 2020-2022, The FreeBSD Project +Copyright (c) 2020-2022, Sergio Carlavilla This script will merge all the pgpkeys into one single file =end def getAllPGPKeys() return Dir.glob('./static/pgpkeys/*.key').sort end def processAllPGPKeys(keysFiles, pgpKeysFile) keysFiles.each{ |keyFile| processPGPKey(keyFile, pgpKeysFile) } end def processPGPKey(keyFile, pgpKeysFile) File.readlines(keyFile).each do |line| if # remove script comment and AsciiDoc syntax not line.include? "// sh addkey.sh" and not line.include? "[.literal-block-margin]" and not line.include? "...." pgpKeysFile.puts(line) end end end # Main method keysFiles = getAllPGPKeys() pgpKeysFile = File.new("./static/pgpkeys/pgpkeys.txt", "w") processAllPGPKeys(keysFiles, pgpKeysFile) diff --git a/website/Makefile b/website/Makefile index 57f8f3fbc9..731517bcad 100644 --- a/website/Makefile +++ b/website/Makefile @@ -1,123 +1,123 @@ # Generate the FreeBSD website # -# Copyright (c) 2020-2021, The FreeBSD Documentation Project -# Copyright (c) 2020-2021, Sergio Carlavilla +# Copyright (c) 2020-2022, The FreeBSD Documentation Project +# Copyright (c) 2020-2022, 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 # List of all languages we have content for ALL_LANGUAGES= de el en es fr hu it ja nl ru tr zh-cn zh-tw LOCALBASE?= /usr/local RUBY_CMD = ${LOCALBASE}/bin/ruby HUGO_CMD = ${LOCALBASE}/bin/hugo HUGO_ARGS?= --verbose RUBYLIB = ../shared/lib .export RUBYLIB .ifndef HOSTNAME . ifdef BIND .HOST=$(BIND) . else .HOST=localhost . endif .else .HOST=$(HOSTNAME) .endif .if defined(DOC_LANG) && !empty(DOC_LANG) LANGUAGES= ${DOC_LANG:S/,/ /g} .if ${LANGUAGES:Men} == "" .warning "Warning: cannot skip 'en'; adding it back" LANGUAGES+= en .endif .else LANGUAGES= ${ALL_LANGUAGES} .endif # Take the list of all languages, and take out the ones we have been # asked for via DOC_LANG. We'll feed this to hugo. SKIP_LANGS= .for a in ${ALL_LANGUAGES} .if ${LANGUAGES:M${a}} == "" SKIP_LANGS+= ${a} .endif .endfor .ORDER: all run .ORDER: starting-message generate-releases .ORDER: starting-message build .ORDER: generate-releases build .ORDER: build post-build .ORDER: post-build end-message all: starting-message generate-releases build post-build end-message run: starting-message generate-releases run-local clean: hugo-clean releases-clean starting-message: .PHONY @echo "---------------------------------------------------------------" @echo "Building the website started on $$(date)" @echo " included languages: ${LANGUAGES}" @echo " excluded languages: ${SKIP_LANGS}" @echo "---------------------------------------------------------------" end-message: .PHONY @echo "---------------------------------------------------------------" @echo "Building the website completed on $$(date)" @echo "---------------------------------------------------------------" generate-releases: data/releases.toml data/releases.toml: ${RUBY_CMD} ./tools/releases-toml.rb run-local: .PHONY HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} server \ ${HUGO_ARGS} -D $(BIND:D--bind=$(BIND)) --baseURL="http://$(.HOST):1313" build: .PHONY HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} ${HUGO_ARGS} post-build: cgi-permissions cgi-permissions: @chmod 555 ./public/cgi/*.cgi hugo-clean: rm -fr public resources releases-clean: rm -f data/releases.toml generate-release: .if empty(RELEASE) && empty(MAIN) @echo "Specify a release or use main. Example RELEASE=14.1 MAIN=true" .else .if exists(./tmp) rm -fr ./tmp .endif @echo "---------------------------------------------------------------" @echo "Generating the release, be patience" @echo "---------------------------------------------------------------" .if !empty(MAIN) git clone --depth 1 --branch main https://git.FreeBSD.org/src.git tmp .elif !empty(RELEASE) git clone --depth 1 --branch release/${RELEASE}.0 https://git.FreeBSD.org/src.git tmp .endif ${HUGO_CMD} new --kind release releases/${RELEASE}R/ ${RUBY_CMD} ./tools/hardware-notes-processor.rb content/en/releases/${RELEASE}R/hardware.adoc rm -fr ./tmp .endif diff --git a/website/themes/beastie/LICENSE b/website/themes/beastie/LICENSE index 8b1e6da482..e94c3e41c7 100644 --- a/website/themes/beastie/LICENSE +++ b/website/themes/beastie/LICENSE @@ -1,23 +1,23 @@ -Copyright (c) 2020-2021, The FreeBSD Project -Copyright (c) 2020-2021, Sergio Carlavilla +Copyright (c) 2020-2022, The FreeBSD Project +Copyright (c) 2020-2022, Sergio Carlavilla Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/website/tools/hardware-notes-processor.rb b/website/tools/hardware-notes-processor.rb index 8d528c3335..4f2bd4fa9d 100644 --- a/website/tools/hardware-notes-processor.rb +++ b/website/tools/hardware-notes-processor.rb @@ -1,44 +1,44 @@ #!/usr/bin/env ruby =begin BSD 2-Clause License -Copyright (c) 2020-2021, The FreeBSD Project -Copyright (c) 2020-2021, Sergio Carlavilla +Copyright (c) 2020-2022, The FreeBSD Project +Copyright (c) 2020-2022, Sergio Carlavilla This script will generate the hardware notes =end require 'open3' # Main method puts "Processing hardware notes..." if ARGV.length < 1 || ARGV.length > 1 puts "Only expecting the release version" exit end hardwareNotesPath = ARGV[0] hardwareNotesContent = "" File.foreach(hardwareNotesPath).with_index do |line| if (line[/&hwlist.\b/]) manualPage = line.gsub("&hwlist.", "").gsub(";", "").gsub("\n", "") if(File.exist?("tmp/share/man/man4/" + manualPage + ".4")) cmd = "mandoc -Tmarkdown tmp/share/man/man4/" + manualPage + ".4 | sed -n '/# HARDWARE/,/#/{/#/!p;}' " mandocOut, err, s = Open3::capture3(cmd) if s.success? hardwareNotesContent << mandocOut end else puts "WARNING: The manual page " + manualPage + " does not exists" end else hardwareNotesContent << line end end File.open(hardwareNotesPath, 'w') do |out| out << hardwareNotesContent end diff --git a/website/tools/releases-toml.rb b/website/tools/releases-toml.rb index 3dbd2f6ea2..d534cce8f5 100644 --- a/website/tools/releases-toml.rb +++ b/website/tools/releases-toml.rb @@ -1,55 +1,55 @@ #!/usr/bin/env ruby =begin BSD 2-Clause License -Copyright (c) 2020-2021, The FreeBSD Project -Copyright (c) 2020-2021, Sergio Carlavilla +Copyright (c) 2020-2022, The FreeBSD Project +Copyright (c) 2020-2022, Sergio Carlavilla This script will merge all the pgpkeys into one single file =end def getValueByKey(key, variables) return variables.fetch(key.gsub("{", "").gsub("}", "")).gsub("\"", "") end def mapVariables(path) variables = Hash.new File.foreach(path).with_index do |line| if line.match("^:{1}[^\n]+") variable = line.strip.sub(":", '') variable = variable.sub(": ", "=\"") variable << "\"" data = variable.split("=") if data.length == 2 variables.store(data[0], data[1]) end end end return variables end # Main method releasesTOMLFile = File.new("./data/releases.toml", "w") releasesTOMLFile.puts("# Code @" + "generated by the FreeBSD Documentation toolchain. DO NOT EDIT.\n") releasesTOMLFile.puts("# Please don't change this file manually but run `make` to update it.\n") releasesTOMLFile.puts("# For more information, please read the FreeBSD Documentation Project Primer\n") releasesTOMLFile.puts("\n") variables = mapVariables("./shared/releases.adoc") variables.each do |key, value| if keyToFind = value.match("\{.*?\}") releasesTOMLFile.puts(key + "=" + value.gsub(keyToFind[0], getValueByKey(keyToFind[0], variables)) + "\n") else releasesTOMLFile.puts(key + "=" + value + "\n") end end