diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000000000000000000000000000000000..13da1301dbb7c46a819bd75b244d2a660f28886c --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,13 @@ +@Library('releng-pipeline') _ + +hugo ( + appName: 'webdev.eclipse.org-docs-hugo', + productionDomain: 'webdev.eclipse.org', + build: [ + containerImage: 'eclipsefdn/hugo-node:h0.76.5-n12.22.1', + script: 'bin/build.sh' + ], + deployment: [ + locationPath: '/docs/hugo' + ] +) diff --git a/bin/build.sh b/bin/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..1a3b39ad11998343a229f7f6a5320244180449bc --- /dev/null +++ b/bin/build.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# =========================================================================== +# Copyright (c) 2021 Eclipse Foundation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Christopher Guindon (Eclipse Foundation) +# ========================================================================== + +set -euo pipefail + +if [[ -e yarn.lock ]]; then + yarn install --frozen-lockfile; +elif [[ -e package-lock.json ]]; then + npm --unsafe-perm ci; +fi; + +hugo --source exampleSite --theme "${PWD##*/}" --themesDir ../../ --gc --minify --destination ."${1}" --baseURL "${2}" diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml index 49f20ed2695c60df4108a49ff560e91c38152779..52f6ba42dd8610a8f72fca9e79038c55cf312ac1 100644 --- a/exampleSite/config/_default/config.toml +++ b/exampleSite/config/_default/config.toml @@ -4,6 +4,7 @@ theme = "hugo-solstice-theme" metaDataFormat = "yaml" googleAnalytics = "" #disableKinds = ["taxonomy", "taxonomyTerm"] +baseURL = "https://webdev.eclipse.org/docs/hugo" [Params] google_tag_manager = "GTM-5WLCZXC" diff --git a/exampleSite/config/_default/menus.en.toml b/exampleSite/config/_default/menus.en.toml index 3b344042c1fea76ab6a8a4735897c88a9195590b..b462f69784ced0748867646460954641f2d6222b 100644 --- a/exampleSite/config/_default/menus.en.toml +++ b/exampleSite/config/_default/menus.en.toml @@ -272,33 +272,33 @@ [[sidebar]] name = "Translation Guide" - url = "/translations" + url = "/translations/" weight = 3 parent = "home" identifier = "translation-guide" [[sidebar]] name = "Translation Guide 1" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Translation Guide 2" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Third parent" - url = "/third-parent" + url = "/third-parent/" weight = 2 pre = "" identifier = "third-parent" [[sidebar]] name = "Test Children" - url = "/third-parent/test-children" + url = "/third-parent/test-children/" weight = 1 parent = "third-parent" pre = "" @@ -306,7 +306,7 @@ [[sidebar]] name = "Test Children 2" - url = "/third-parent/test-children-2" + url = "/third-parent/test-children-2/" weight = 1 parent = "third-parent" pre = "" @@ -314,13 +314,13 @@ [[sidebar]] name = "Test Children Children 1" - url = "/third-parent/test-children/test-children-children" + url = "/third-parent/test-children/test-children-children/" weight = 1 parent = "test-children" [[sidebar]] name = "Test Children Children 2" - url = "/third-parent/test-children/test-children-children-2" + url = "/third-parent/test-children/test-children-children-2/" weight = 2 parent = "test-children" diff --git a/exampleSite/config/_default/menus.es.toml b/exampleSite/config/_default/menus.es.toml index 927d996bc0916904899d4f246dca6ee9744b493f..3c287b86d8392fb5c88ef10e5f4de06696618338 100644 --- a/exampleSite/config/_default/menus.es.toml +++ b/exampleSite/config/_default/menus.es.toml @@ -233,7 +233,7 @@ [[sidebar]] name = "Component list" - url = "/components" + url = "/components/" weight = 1 parent = "home" pre = "" @@ -248,33 +248,33 @@ [[sidebar]] name = "Translation Guide" - url = "/translations" + url = "/translations/" weight = 3 parent = "home" identifier = "translation-guide" [[sidebar]] name = "Translation Guide 1" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Translation Guide 2" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Third parent" - url = "/third-parent" + url = "/third-parent/" weight = 2 pre = "" identifier = "third-parent" [[sidebar]] name = "Test Children" - url = "/third-parent/test-children" + url = "/third-parent/test-children/" weight = 1 parent = "third-parent" pre = "" @@ -282,7 +282,7 @@ [[sidebar]] name = "Test Children 2" - url = "/third-parent/test-children-2" + url = "/third-parent/test-children-2/" weight = 1 parent = "third-parent" pre = "" @@ -290,13 +290,13 @@ [[sidebar]] name = "Test Children Children 1" - url = "/third-parent/test-children/test-children-children" + url = "/third-parent/test-children/test-children-children/" weight = 1 parent = "test-children" [[sidebar]] name = "Test Children Children 2" - url = "/third-parent/test-children/test-children-children-2" + url = "/third-parent/test-children/test-children-children-2/" weight = 2 parent = "test-children" diff --git a/exampleSite/config/_default/menus.fr.toml b/exampleSite/config/_default/menus.fr.toml index 430955a8ee249edc751a5ffb313142d7fe7398ff..881443618d741687c6bee024fa03eb0b8377cd6c 100644 --- a/exampleSite/config/_default/menus.fr.toml +++ b/exampleSite/config/_default/menus.fr.toml @@ -234,7 +234,7 @@ [[sidebar]] name = "Liste des composantes" - url = "/components" + url = "/components/" weight = 1 parent = "home" pre = "" @@ -249,32 +249,32 @@ [[sidebar]] name = "Translation Guide" - url = "/translations" + url = "/translations/" weight = 3 parent = "home" [[sidebar]] name = "Translation Guide 1" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Translation Guide 2" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Third parent" - url = "/third-parent" + url = "/third-parent/" weight = 2 pre = "" identifier = "third-parent" [[sidebar]] name = "Test Children" - url = "/third-parent/test-children" + url = "/third-parent/test-children/" weight = 1 parent = "third-parent" pre = "" @@ -282,7 +282,7 @@ [[sidebar]] name = "Test Children 2" - url = "/third-parent/test-children-2" + url = "/third-parent/test-children-2/" weight = 1 parent = "third-parent" pre = "" @@ -290,13 +290,13 @@ [[sidebar]] name = "Test Children Children 1" - url = "/third-parent/test-children/test-children-children" + url = "/third-parent/test-children/test-children-children/" weight = 1 parent = "test-children" [[sidebar]] name = "Test Children Children 2" - url = "/third-parent/test-children/test-children-children-2" + url = "/third-parent/test-children/test-children-children-2/" weight = 2 parent = "test-children" diff --git a/exampleSite/config/_default/menus.jp.toml b/exampleSite/config/_default/menus.jp.toml index 927d996bc0916904899d4f246dca6ee9744b493f..3c287b86d8392fb5c88ef10e5f4de06696618338 100644 --- a/exampleSite/config/_default/menus.jp.toml +++ b/exampleSite/config/_default/menus.jp.toml @@ -233,7 +233,7 @@ [[sidebar]] name = "Component list" - url = "/components" + url = "/components/" weight = 1 parent = "home" pre = "" @@ -248,33 +248,33 @@ [[sidebar]] name = "Translation Guide" - url = "/translations" + url = "/translations/" weight = 3 parent = "home" identifier = "translation-guide" [[sidebar]] name = "Translation Guide 1" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Translation Guide 2" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Third parent" - url = "/third-parent" + url = "/third-parent/" weight = 2 pre = "" identifier = "third-parent" [[sidebar]] name = "Test Children" - url = "/third-parent/test-children" + url = "/third-parent/test-children/" weight = 1 parent = "third-parent" pre = "" @@ -282,7 +282,7 @@ [[sidebar]] name = "Test Children 2" - url = "/third-parent/test-children-2" + url = "/third-parent/test-children-2/" weight = 1 parent = "third-parent" pre = "" @@ -290,13 +290,13 @@ [[sidebar]] name = "Test Children Children 1" - url = "/third-parent/test-children/test-children-children" + url = "/third-parent/test-children/test-children-children/" weight = 1 parent = "test-children" [[sidebar]] name = "Test Children Children 2" - url = "/third-parent/test-children/test-children-children-2" + url = "/third-parent/test-children/test-children-children-2/" weight = 2 parent = "test-children" diff --git a/exampleSite/config/_default/menus.pt.toml b/exampleSite/config/_default/menus.pt.toml index 927d996bc0916904899d4f246dca6ee9744b493f..3c287b86d8392fb5c88ef10e5f4de06696618338 100644 --- a/exampleSite/config/_default/menus.pt.toml +++ b/exampleSite/config/_default/menus.pt.toml @@ -233,7 +233,7 @@ [[sidebar]] name = "Component list" - url = "/components" + url = "/components/" weight = 1 parent = "home" pre = "" @@ -248,33 +248,33 @@ [[sidebar]] name = "Translation Guide" - url = "/translations" + url = "/translations/" weight = 3 parent = "home" identifier = "translation-guide" [[sidebar]] name = "Translation Guide 1" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Translation Guide 2" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Third parent" - url = "/third-parent" + url = "/third-parent/" weight = 2 pre = "" identifier = "third-parent" [[sidebar]] name = "Test Children" - url = "/third-parent/test-children" + url = "/third-parent/test-children/" weight = 1 parent = "third-parent" pre = "" @@ -282,7 +282,7 @@ [[sidebar]] name = "Test Children 2" - url = "/third-parent/test-children-2" + url = "/third-parent/test-children-2/" weight = 1 parent = "third-parent" pre = "" @@ -290,13 +290,13 @@ [[sidebar]] name = "Test Children Children 1" - url = "/third-parent/test-children/test-children-children" + url = "/third-parent/test-children/test-children-children/" weight = 1 parent = "test-children" [[sidebar]] name = "Test Children Children 2" - url = "/third-parent/test-children/test-children-children-2" + url = "/third-parent/test-children/test-children-children-2/" weight = 2 parent = "test-children" diff --git a/exampleSite/config/_default/menus.ru.toml b/exampleSite/config/_default/menus.ru.toml index 927d996bc0916904899d4f246dca6ee9744b493f..3c287b86d8392fb5c88ef10e5f4de06696618338 100644 --- a/exampleSite/config/_default/menus.ru.toml +++ b/exampleSite/config/_default/menus.ru.toml @@ -233,7 +233,7 @@ [[sidebar]] name = "Component list" - url = "/components" + url = "/components/" weight = 1 parent = "home" pre = "" @@ -248,33 +248,33 @@ [[sidebar]] name = "Translation Guide" - url = "/translations" + url = "/translations/" weight = 3 parent = "home" identifier = "translation-guide" [[sidebar]] name = "Translation Guide 1" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Translation Guide 2" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Third parent" - url = "/third-parent" + url = "/third-parent/" weight = 2 pre = "" identifier = "third-parent" [[sidebar]] name = "Test Children" - url = "/third-parent/test-children" + url = "/third-parent/test-children/" weight = 1 parent = "third-parent" pre = "" @@ -282,7 +282,7 @@ [[sidebar]] name = "Test Children 2" - url = "/third-parent/test-children-2" + url = "/third-parent/test-children-2/" weight = 1 parent = "third-parent" pre = "" @@ -290,13 +290,13 @@ [[sidebar]] name = "Test Children Children 1" - url = "/third-parent/test-children/test-children-children" + url = "/third-parent/test-children/test-children-children/" weight = 1 parent = "test-children" [[sidebar]] name = "Test Children Children 2" - url = "/third-parent/test-children/test-children-children-2" + url = "/third-parent/test-children/test-children-children-2/" weight = 2 parent = "test-children" diff --git a/exampleSite/config/_default/menus.zh.toml b/exampleSite/config/_default/menus.zh.toml index 927d996bc0916904899d4f246dca6ee9744b493f..3c287b86d8392fb5c88ef10e5f4de06696618338 100644 --- a/exampleSite/config/_default/menus.zh.toml +++ b/exampleSite/config/_default/menus.zh.toml @@ -233,7 +233,7 @@ [[sidebar]] name = "Component list" - url = "/components" + url = "/components/" weight = 1 parent = "home" pre = "" @@ -248,33 +248,33 @@ [[sidebar]] name = "Translation Guide" - url = "/translations" + url = "/translations/" weight = 3 parent = "home" identifier = "translation-guide" [[sidebar]] name = "Translation Guide 1" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Translation Guide 2" - url = "/translations" + url = "/translations/" weight = 1 parent = "translation-guide" [[sidebar]] name = "Third parent" - url = "/third-parent" + url = "/third-parent/" weight = 2 pre = "" identifier = "third-parent" [[sidebar]] name = "Test Children" - url = "/third-parent/test-children" + url = "/third-parent/test-children/" weight = 1 parent = "third-parent" pre = "" @@ -282,7 +282,7 @@ [[sidebar]] name = "Test Children 2" - url = "/third-parent/test-children-2" + url = "/third-parent/test-children-2/" weight = 1 parent = "third-parent" pre = "" @@ -290,13 +290,13 @@ [[sidebar]] name = "Test Children Children 1" - url = "/third-parent/test-children/test-children-children" + url = "/third-parent/test-children/test-children-children/" weight = 1 parent = "test-children" [[sidebar]] name = "Test Children Children 2" - url = "/third-parent/test-children/test-children-children-2" + url = "/third-parent/test-children/test-children-children-2/" weight = 2 parent = "test-children" diff --git a/layouts/partials/sidebar-block.html b/layouts/partials/sidebar-block.html index 9f7c6bbf36cad10018a7f295ef3acc43e60deb84..ca2ead59026aee03c81e8f0688368acc10fa5fc9 100644 --- a/layouts/partials/sidebar-block.html +++ b/layouts/partials/sidebar-block.html @@ -1,4 +1,4 @@ -