diff --git a/documentation/config/offline/config.toml b/documentation/config/offline/config.toml index f359e2ad7e..653ef5b279 100644 --- a/documentation/config/offline/config.toml +++ b/documentation/config/offline/config.toml @@ -1,43 +1,44 @@ # FreeBSD documentation -baseURL = "localhost" +baseURL = "" title = "FreeBSD Documentation Portal" copyright = "BSD 2-clause 'Simplified' License" defaultContentLanguage = "en" defaultContentLanguageInSubdir = true disablePathToLower = true theme = "beastie" disableKinds = [ "taxonomy", "term", "RSS", "sitemap", "robotsTXT", "404" ] authors = [ "carlavilla@FreeBSD.org" ] ignoreFiles = [ "chapter.adoc$", "contrib-386bsd.adoc$", "contrib-additional.adoc$", "contrib-committers.adoc$", "contrib-corealumni.adoc$", "contrib-develalumni.adoc$", "contrib-develinmemoriam.adoc$", "contrib-portmgralumni.adoc$", "books.adoc$", "\\.po$" ] enableRobotsTXT = true +relativeURLs = true [params] websiteURL = "https://www.FreeBSD.org" description = "FreeBSD Documentation Portal" isOnline = false [security] enableInlineShortcodes = false [security.exec] allow = ["^dart-sass-embedded$", "^go$", "^npx$", "^postcss$", "^asciidoctor$"] osEnv = ["(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM|LOAD_PATH|RUBYLIB)$"] [security.funcs] getenv = ["^HUGO_"] [security.http] methods = ["(?i)GET|POST"] urls = [".*"] [markup.asciidocExt] - extensions = ["man-macro", "inter-document-references-macro", "cross-document-references-macro", "sectnumoffset-treeprocessor", "packages-macro", "git-macro"] - [markup.asciidocExt.attributes] - env-beastie = true - isOnline = false - skip-front-matter = true + extensions = ["man-macro", "inter-document-references-macro", "cross-document-references-macro", "sectnumoffset-treeprocessor", "packages-macro", "git-macro"] + [markup.asciidocExt.attributes] + env-beastie = true + isOnline = false + skip-front-matter = true [outputs] home = [ "HTML" ] page = [ "HTML" ] list = [ "HTML" ] single = [ "HTML" ] section = [ "HTML" ] diff --git a/documentation/themes/beastie/layouts/books/list.html b/documentation/themes/beastie/layouts/books/list.html index 7b0998acce..d4df934989 100644 --- a/documentation/themes/beastie/layouts/books/list.html +++ b/documentation/themes/beastie/layouts/books/list.html @@ -1,132 +1,134 @@ {{ define "main" }}
{{ if eq .Params.showBookMenu true }} {{ end }}

{{ .Title }}

{{ if .Params.subtitle }}

{{ .Params.subtitle }}

{{ end }}
{{ if .Params.copyright }} {{ end}} {{ if isset .Params "trademarks" }} {{ partial "trademarks" .Params.trademarks }} {{ end }}

{{ i18n "toc" }}

{{ .TableOfContents }}
- {{ if .Params.add_split_page_link }} -
- [ {{ i18n "split-html" }} / {{ i18n "single-html" }} ] -
+ {{ if $.Site.Params.isOnline }} + {{ if .Params.add_split_page_link }} +
+ [ {{ i18n "split-html" }} / {{ i18n "single-html" }} ] +
+ {{ end }} + {{ if .Params.add_single_page_link }} +
+ [ {{ i18n "split-html" }} / {{ i18n "single-html" }} ] +
{{ end }} - {{ if .Params.add_single_page_link }} -
- [ {{ i18n "split-html" }} / {{ i18n "single-html" }} ] -
{{ end }}
{{ .Content }}

{{ if .Params.prev }} {{ end }}
- {{ i18n "home" }} + {{ if $.Site.Params.isOnline }} + {{ i18n "home" }} + {{ else }} + {{ i18n "home" }} + {{ end }}
{{ if .Params.next }} {{ end }}
{{ end }} diff --git a/documentation/themes/beastie/layouts/books/single.html b/documentation/themes/beastie/layouts/books/single.html index 7b0998acce..d4df934989 100644 --- a/documentation/themes/beastie/layouts/books/single.html +++ b/documentation/themes/beastie/layouts/books/single.html @@ -1,132 +1,134 @@ {{ define "main" }}
{{ if eq .Params.showBookMenu true }} {{ end }}

{{ .Title }}

{{ if .Params.subtitle }}

{{ .Params.subtitle }}

{{ end }}
{{ if .Params.copyright }} {{ end}} {{ if isset .Params "trademarks" }} {{ partial "trademarks" .Params.trademarks }} {{ end }}

{{ i18n "toc" }}

{{ .TableOfContents }}
- {{ if .Params.add_split_page_link }} -
- [ {{ i18n "split-html" }} / {{ i18n "single-html" }} ] -
+ {{ if $.Site.Params.isOnline }} + {{ if .Params.add_split_page_link }} +
+ [ {{ i18n "split-html" }} / {{ i18n "single-html" }} ] +
+ {{ end }} + {{ if .Params.add_single_page_link }} +
+ [ {{ i18n "split-html" }} / {{ i18n "single-html" }} ] +
{{ end }} - {{ if .Params.add_single_page_link }} -
- [ {{ i18n "split-html" }} / {{ i18n "single-html" }} ] -
{{ end }}
{{ .Content }}

{{ if .Params.prev }} {{ end }}
- {{ i18n "home" }} + {{ if $.Site.Params.isOnline }} + {{ i18n "home" }} + {{ else }} + {{ i18n "home" }} + {{ end }}
{{ if .Params.next }} {{ end }}
{{ end }} diff --git a/documentation/themes/beastie/layouts/partials/menu.html b/documentation/themes/beastie/layouts/partials/menu.html index 1d118e85e4..7d82aac764 100644 --- a/documentation/themes/beastie/layouts/partials/menu.html +++ b/documentation/themes/beastie/layouts/partials/menu.html @@ -1,24 +1,35 @@ {{ with .Site.GetPage .Params.path }} {{ end }} diff --git a/documentation/themes/beastie/layouts/partials/site-footer.html b/documentation/themes/beastie/layouts/partials/site-footer.html index 3b3303ea96..7e00948dd1 100755 --- a/documentation/themes/beastie/layouts/partials/site-footer.html +++ b/documentation/themes/beastie/layouts/partials/site-footer.html @@ -1,63 +1,65 @@ diff --git a/documentation/themes/beastie/layouts/partials/site-head.html b/documentation/themes/beastie/layouts/partials/site-head.html index df073603e6..a9b1d38026 100644 --- a/documentation/themes/beastie/layouts/partials/site-head.html +++ b/documentation/themes/beastie/layouts/partials/site-head.html @@ -1,52 +1,63 @@ {{ with .Params.Title }}{{ . }} | {{ end }} {{ block "title" . }}{{ .Site.Title }}{{ end }} - - - - - {{- $styles := resources.Get "styles/main.scss" | resources.ToCSS | resources.Minify }} - - + {{ if $.Site.Params.isOnline }} + + + {{- $styles := resources.Get "styles/main.scss" | resources.ToCSS | resources.Minify }} + + + + {{- $themeChooser := resources.Get "js/theme-chooser.js" | resources.Minify }} + + {{ else }} + + + {{- $styles := resources.Get "styles/main.scss" | resources.ToCSS | resources.Minify }} + + - {{- $themeChooser := resources.Get "js/theme-chooser.js" | resources.Minify }} - + {{- $themeChooser := resources.Get "js/theme-chooser.js" | resources.Minify }} + + {{ end }} - - - - - - - - - - - - - - - - {{ template "_internal/google_analytics.html" . }} + {{ if $.Site.Params.isOnline }} + + + + + + + + + + + + + + + + {{ template "_internal/google_analytics.html" . }} + {{ end }} diff --git a/documentation/themes/beastie/layouts/partials/site-header.html b/documentation/themes/beastie/layouts/partials/site-header.html index 5e6af7604a..25e98b01fc 100755 --- a/documentation/themes/beastie/layouts/partials/site-header.html +++ b/documentation/themes/beastie/layouts/partials/site-header.html @@ -1,15 +1,21 @@