From 27aaf3e9d501fc8ebd486c70d538428081033db3 Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Mon, 3 Oct 2022 16:11:03 -0400 Subject: [PATCH 01/19] Migrate EF websites to our new preview framework Related to https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/1978 --- Jenkinsfile | 6 ++++++ netlify.toml | 18 ------------------ package.json | 3 +-- 3 files changed, 7 insertions(+), 20 deletions(-) create mode 100644 Jenkinsfile delete mode 100644 netlify.toml diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..5f3716e --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,6 @@ +@Library('releng-pipeline') _ + +hugo ( + appName: 'webdev.eclipse.org/docs/hugo', + productionDomain: 'webdev.eclipse.org', +) diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index 9405793..0000000 --- a/netlify.toml +++ /dev/null @@ -1,18 +0,0 @@ -[build] - command = "npm run build && hugo --gc --minify -b $URL --themesDir ../../ --source exampleSite" - publish = "exampleSite/public" - -[build.environment] - HUGO_THEME = "repo" - HUGO_VERSION = "0.76.5" - HUGO_ENABLEGITINFO = "true" - NODE_VERSION = "12.18.3" - -[context.production.environment] - HUGO_ENV = "production" - -[context.deploy-preview] - command = "npm run build && hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL --themesDir ../../ --source exampleSite" - -[context.branch-deploy] - command = "npm run build && hugo --gc --minify -b $DEPLOY_PRIME_URL --themesDir ../../ --source exampleSite" diff --git a/package.json b/package.json index e66efc4..0098a0f 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,7 @@ "hot": "NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", "production": "NODE_ENV=production webpack --progress --config=node_modules/laravel-mix/setup/webpack.config.js", "fetch_project": "node bin/projects/index.js -l exampleSite/data", - "build": "npm run fetch_project && webpack --progress --config=node_modules/laravel-mix/setup/webpack.config.js", - "prepare_release": "rm -rf node_modules && rm package-lock.json && npm install && npm run production && git add . && git commit -m \"prepare new release\" -s" + "postinstall": "npm run fetch_project && npm run production" }, "readmeFilename": "README.md", "dependencies": { -- GitLab From 8e73b0929c4208df36734cf6f5fb111e3c539f9a Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Tue, 4 Oct 2022 08:22:43 -0400 Subject: [PATCH 02/19] Migrate EF websites to our new preview framework Related to https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/1978 --- Jenkinsfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 5f3716e..b80992c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,4 +3,10 @@ hugo ( appName: 'webdev.eclipse.org/docs/hugo', productionDomain: 'webdev.eclipse.org', + build: [ + containerImage: 'eclipsefdn/hugo-node:h0.76.5-n12.22.1' + ], + deployment: [ + locationPath: '/docs/hugo' + ] ) -- GitLab From 1f3c3522f3036e29816526d667130c688c5e97f1 Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Mon, 21 Nov 2022 11:22:43 -0500 Subject: [PATCH 03/19] add build script Signed-off-by: Christopher Guindon --- Jenkinsfile | 5 +++-- bin/build.sh | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 bin/build.sh diff --git a/Jenkinsfile b/Jenkinsfile index b80992c..7019029 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,8 +3,9 @@ hugo ( appName: 'webdev.eclipse.org/docs/hugo', productionDomain: 'webdev.eclipse.org', - build: [ - containerImage: 'eclipsefdn/hugo-node:h0.76.5-n12.22.1' + 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 0000000..4ac598b --- /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 --gc --minify --destination "${1}" -- GitLab From 849aad22714a0836c8d28c1bbfc5996f6a02b2e0 Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Mon, 21 Nov 2022 11:23:18 -0500 Subject: [PATCH 04/19] add build script Signed-off-by: Christopher Guindon --- bin/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build.sh b/bin/build.sh index 4ac598b..8dcac79 100644 --- a/bin/build.sh +++ b/bin/build.sh @@ -18,4 +18,4 @@ elif [[ -e package-lock.json ]]; then npm --unsafe-perm ci; fi; -hugo --gc --minify --destination "${1}" +hugo -s exampleSite --themesDir=../.. --gc --minify --destination "${1}" -- GitLab From 37a98b16a8e0997afa8c984bc1c7e850c6e4a49a Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Mon, 21 Nov 2022 11:40:20 -0500 Subject: [PATCH 05/19] add build script Signed-off-by: Christopher Guindon --- bin/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/build.sh b/bin/build.sh index 8dcac79..5b40d67 100644 --- a/bin/build.sh +++ b/bin/build.sh @@ -18,4 +18,5 @@ elif [[ -e package-lock.json ]]; then npm --unsafe-perm ci; fi; +echo "${1}" hugo -s exampleSite --themesDir=../.. --gc --minify --destination "${1}" -- GitLab From 8d9add9e964c6735efc02ea744016bd7529bfea7 Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Mon, 21 Nov 2022 12:03:10 -0500 Subject: [PATCH 06/19] add build script Signed-off-by: Christopher Guindon --- bin/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build.sh b/bin/build.sh index 5b40d67..8795258 100644 --- a/bin/build.sh +++ b/bin/build.sh @@ -19,4 +19,4 @@ elif [[ -e package-lock.json ]]; then fi; echo "${1}" -hugo -s exampleSite --themesDir=../.. --gc --minify --destination "${1}" +hugo -s exampleSite --themesDir=./ --gc --minify --destination "${1}" -- GitLab From 64b01f5f9a70bcc447cfb2d4ef18cb01afe2009b Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Mon, 21 Nov 2022 12:06:58 -0500 Subject: [PATCH 07/19] add build script Signed-off-by: Christopher Guindon --- bin/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build.sh b/bin/build.sh index 8795258..e138e9f 100644 --- a/bin/build.sh +++ b/bin/build.sh @@ -19,4 +19,4 @@ elif [[ -e package-lock.json ]]; then fi; echo "${1}" -hugo -s exampleSite --themesDir=./ --gc --minify --destination "${1}" +hugo -s exampleSite --themesDir ${PWD} --gc --minify --destination "${1}" -- GitLab From 526ad8a105b027a9e67011282c834c2885386271 Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Mon, 21 Nov 2022 12:18:30 -0500 Subject: [PATCH 08/19] add build script Signed-off-by: Christopher Guindon --- bin/build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/build.sh b/bin/build.sh index e138e9f..7917b72 100644 --- a/bin/build.sh +++ b/bin/build.sh @@ -18,5 +18,4 @@ elif [[ -e package-lock.json ]]; then npm --unsafe-perm ci; fi; -echo "${1}" -hugo -s exampleSite --themesDir ${PWD} --gc --minify --destination "${1}" +hugo -s exampleSite --theme "${PWD##*/}" --themesDir ../../ --gc --minify --destination"${1}" -- GitLab From 60ed00ead764c8062da4b7563241f39412bbf231 Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Mon, 21 Nov 2022 12:20:47 -0500 Subject: [PATCH 09/19] add build script Signed-off-by: Christopher Guindon --- bin/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build.sh b/bin/build.sh index 7917b72..59e73be 100644 --- a/bin/build.sh +++ b/bin/build.sh @@ -18,4 +18,4 @@ elif [[ -e package-lock.json ]]; then npm --unsafe-perm ci; fi; -hugo -s exampleSite --theme "${PWD##*/}" --themesDir ../../ --gc --minify --destination"${1}" +hugo -s exampleSite --theme "${PWD##*/}" --themesDir ../../ --gc --minify --destination "${1}" -- GitLab From 137abe33f2bb4545328a269ad654fe008cca5d4c Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Mon, 21 Nov 2022 12:25:13 -0500 Subject: [PATCH 10/19] add build script Signed-off-by: Christopher Guindon --- bin/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build.sh b/bin/build.sh index 59e73be..f210cea 100644 --- a/bin/build.sh +++ b/bin/build.sh @@ -18,4 +18,4 @@ elif [[ -e package-lock.json ]]; then npm --unsafe-perm ci; fi; -hugo -s exampleSite --theme "${PWD##*/}" --themesDir ../../ --gc --minify --destination "${1}" +hugo --source exampleSite --theme "${PWD##*/}" --themesDir ../../ --gc --minify --destination ../"${1}" -- GitLab From 9d4e825758f4959580f19c84db51b315ab7522f1 Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Mon, 21 Nov 2022 12:30:43 -0500 Subject: [PATCH 11/19] add build script Signed-off-by: Christopher Guindon --- bin/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build.sh b/bin/build.sh index f210cea..04ae88c 100644 --- a/bin/build.sh +++ b/bin/build.sh @@ -18,4 +18,4 @@ elif [[ -e package-lock.json ]]; then npm --unsafe-perm ci; fi; -hugo --source exampleSite --theme "${PWD##*/}" --themesDir ../../ --gc --minify --destination ../"${1}" +hugo --source exampleSite --theme "${PWD##*/}" --themesDir ../../ --gc --minify --destination ."${1}" -- GitLab From c278b0a400de163a836c6a797ff4e35b846d542f Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Mon, 21 Nov 2022 13:52:24 -0500 Subject: [PATCH 12/19] add build script Signed-off-by: Christopher Guindon --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7019029..7e1edcd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ hugo ( appName: 'webdev.eclipse.org/docs/hugo', productionDomain: 'webdev.eclipse.org', build: [ - // containerImage: 'eclipsefdn/hugo-node:h0.76.5-n12.22.1', + containerImage: 'eclipsefdn/hugo-node:h0.76.5-n12.22.1', script: 'bin/build.sh' ], deployment: [ -- GitLab From 5b907b3bee9d105a4db2b7d33b31d8474bd0e1fe Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Wed, 23 Nov 2022 15:51:18 +0000 Subject: [PATCH 13/19] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7e1edcd..13da130 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ @Library('releng-pipeline') _ hugo ( - appName: 'webdev.eclipse.org/docs/hugo', + appName: 'webdev.eclipse.org-docs-hugo', productionDomain: 'webdev.eclipse.org', build: [ containerImage: 'eclipsefdn/hugo-node:h0.76.5-n12.22.1', -- GitLab From 12d5724f5e4237cb5185517e6ba102be1ea5e9c0 Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Wed, 23 Nov 2022 16:30:57 +0000 Subject: [PATCH 14/19] Update build.sh --- bin/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build.sh b/bin/build.sh index 04ae88c..1a3b39a 100644 --- a/bin/build.sh +++ b/bin/build.sh @@ -18,4 +18,4 @@ elif [[ -e package-lock.json ]]; then npm --unsafe-perm ci; fi; -hugo --source exampleSite --theme "${PWD##*/}" --themesDir ../../ --gc --minify --destination ."${1}" +hugo --source exampleSite --theme "${PWD##*/}" --themesDir ../../ --gc --minify --destination ."${1}" --baseURL "${2}" -- GitLab From 102b4a24353fdd4cd63dcf56fca24a2d3c1e1e9b Mon Sep 17 00:00:00 2001 From: Christopher Guindon Date: Wed, 23 Nov 2022 15:30:57 -0500 Subject: [PATCH 15/19] update baseurl Signed-off-by: Christopher Guindon --- exampleSite/config/_default/config.toml | 1 + layouts/partials/sidebar-block.html | 8 ++++---- layouts/partials/sidebar.html | 10 +++++----- package.json | 2 +- yarn.lock | 8 ++++---- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml index 49f20ed..1a51d21 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/layouts/partials/sidebar-block.html b/layouts/partials/sidebar-block.html index 9f7c6bb..4fc0bfa 100644 --- a/layouts/partials/sidebar-block.html +++ b/layouts/partials/sidebar-block.html @@ -1,4 +1,4 @@ -