From 951fe3059cca95e86653e4fa63d5279b71af53ee Mon Sep 17 00:00:00 2001 From: Markus Rudolph Date: Thu, 30 May 2024 08:44:40 +0200 Subject: [PATCH 1/8] Fix 404 --- .../layouts/partials/head/others.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html b/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html index 43b21d41..0a6fa59a 100644 --- a/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html +++ b/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html @@ -3,17 +3,17 @@ - - + + - - + + - - + + - - + + {{ if (default false $.Site.Params.GeekdocOverwriteHTMLBase) }} From 9c134c1795ac107b227b62657004b6882d97f885 Mon Sep 17 00:00:00 2001 From: Markus Rudolph Date: Thu, 30 May 2024 08:52:54 +0200 Subject: [PATCH 2/8] Another trial --- .../layouts/partials/head/others.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html b/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html index 0a6fa59a..3d08a281 100644 --- a/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html +++ b/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html @@ -1,19 +1,19 @@ - + - - + + - - + + - - + + - - + + {{ if (default false $.Site.Params.GeekdocOverwriteHTMLBase) }} From 6813f4bb8d9a459a28bc54a4cd1394fd7476ac4d Mon Sep 17 00:00:00 2001 From: Markus Rudolph Date: Thu, 30 May 2024 09:07:28 +0200 Subject: [PATCH 3/8] Another trial --- .../layouts/partials/head/others.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html b/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html index 3d08a281..5b544295 100644 --- a/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html +++ b/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html @@ -1,19 +1,19 @@ - + - - + + - - + + - - + + - - + + {{ if (default false $.Site.Params.GeekdocOverwriteHTMLBase) }} From bb5591d8985ce0e9230408e31eaf2f21d9a7af0e Mon Sep 17 00:00:00 2001 From: Markus Rudolph Date: Thu, 30 May 2024 09:19:21 +0200 Subject: [PATCH 4/8] Revert trials --- .../layouts/partials/head/others.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html b/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html index 5b544295..43b21d41 100644 --- a/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html +++ b/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html @@ -1,19 +1,19 @@ - + - - + + - - + + - - + + - - + + {{ if (default false $.Site.Params.GeekdocOverwriteHTMLBase) }} From e5fb2751b5cafe0f1c8a353f351602e565430b3a Mon Sep 17 00:00:00 2001 From: Markus Rudolph Date: Thu, 30 May 2024 09:24:54 +0200 Subject: [PATCH 5/8] Another test --- hugo/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugo/config.toml b/hugo/config.toml index b49c87f1..4d4e64a6 100644 --- a/hugo/config.toml +++ b/hugo/config.toml @@ -65,7 +65,7 @@ enableRobotsTXT = true # (Optional, default false) Set HTMl to .Site.BaseURL if enabled. It might be required # if a subdirectory is used within Hugos BaseURL. # See https://developer.mozilla.org/de/docs/Web/HTML/Element/base. - #geekdocOverwriteHTMLBase = false + geekdocOverwriteHTMLBase = true # (Optional, default false) Auto-decrease brightness of images and add a slightly grayscale to avoid # bright spots while using the dark mode. From 52edf43281d0bae9b39d4433877d113282c66a33 Mon Sep 17 00:00:00 2001 From: Markus Rudolph Date: Mon, 3 Jun 2024 16:06:51 +0200 Subject: [PATCH 6/8] Next trial --- hugo/config.toml | 2 +- hugo/themes/hugo-geekdoc/layouts/partials/head/others.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hugo/config.toml b/hugo/config.toml index 4d4e64a6..b49c87f1 100644 --- a/hugo/config.toml +++ b/hugo/config.toml @@ -65,7 +65,7 @@ enableRobotsTXT = true # (Optional, default false) Set HTMl to .Site.BaseURL if enabled. It might be required # if a subdirectory is used within Hugos BaseURL. # See https://developer.mozilla.org/de/docs/Web/HTML/Element/base. - geekdocOverwriteHTMLBase = true + #geekdocOverwriteHTMLBase = false # (Optional, default false) Auto-decrease brightness of images and add a slightly grayscale to avoid # bright spots while using the dark mode. diff --git a/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html b/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html index 43b21d41..f5e18fb2 100644 --- a/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html +++ b/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html @@ -12,8 +12,8 @@ - - + + {{ if (default false $.Site.Params.GeekdocOverwriteHTMLBase) }} From 400d78ccdac40021b572ce3537822f13e74825fc Mon Sep 17 00:00:00 2001 From: Markus Rudolph Date: Mon, 3 Jun 2024 16:32:02 +0200 Subject: [PATCH 7/8] Next trial --- hugo/config.toml | 2 +- hugo/themes/hugo-geekdoc/layouts/partials/head/others.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hugo/config.toml b/hugo/config.toml index b49c87f1..4d4e64a6 100644 --- a/hugo/config.toml +++ b/hugo/config.toml @@ -65,7 +65,7 @@ enableRobotsTXT = true # (Optional, default false) Set HTMl to .Site.BaseURL if enabled. It might be required # if a subdirectory is used within Hugos BaseURL. # See https://developer.mozilla.org/de/docs/Web/HTML/Element/base. - #geekdocOverwriteHTMLBase = false + geekdocOverwriteHTMLBase = true # (Optional, default false) Auto-decrease brightness of images and add a slightly grayscale to avoid # bright spots while using the dark mode. diff --git a/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html b/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html index f5e18fb2..43b21d41 100644 --- a/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html +++ b/hugo/themes/hugo-geekdoc/layouts/partials/head/others.html @@ -12,8 +12,8 @@ - - + + {{ if (default false $.Site.Params.GeekdocOverwriteHTMLBase) }} From fb0ce617e368b2661e353e0a16dc4e8d732d1e15 Mon Sep 17 00:00:00 2001 From: Markus Rudolph Date: Tue, 4 Jun 2024 09:13:06 +0200 Subject: [PATCH 8/8] Try to fix GH pages preview --- .github/workflows/preview.yml | 2 +- hugo/package.json | 5 +++-- package.json | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index e946636d..f2c578a9 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -30,7 +30,7 @@ jobs: - name: Build run: | npm install - npm run build + BASE_URL=/pr-${{ github.event.number }} npm run preview - name: Upload artifact uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: diff --git a/hugo/package.json b/hugo/package.json index bb8189bf..a7afe5e4 100644 --- a/hugo/package.json +++ b/hugo/package.json @@ -18,8 +18,9 @@ "build:worker/sql": "esbuild ./assets/scripts/sql/language-server.ts --bundle --format=iife --outfile=./static/showcase/libs/worker/sqlServerWorker.js", "build:worker/minilogo": "esbuild ../node_modules/langium-minilogo/out/language-server/main-browser.js --bundle --format=iife --outfile=./static/showcase/libs/worker/minilogoServerWorker.js", "build:static": "npm run clean:static && npm run build:worker/statemachine && npm run build:worker/domainmodel && npm run build:worker/sql && npm run build:worker/minilogo && npm run build:worker/arithmetics && npm run build:worker/playground-common && npm run build:worker/playground-langium && npm run build:worker/playground-user && npm run copy:monaco-workers", - "build": "npm run build:static && cross-env NODE_ENV=production hugo --config ./config.toml -b / -d ../public --gc --minify ", - "watch": "npm run build:static && cross-env NODE_ENV=development hugo server --config ./config.toml -D -b localhost:1313 -d ../public --appendPort=false", + "preview": "npm run build:static && cross-env NODE_ENV=production hugo --config ./config.toml -b $BASE_URL -d ../public --gc --minify", + "build": "npm run build:static && cross-env NODE_ENV=production hugo --config ./config.toml -b / -d ../public --gc --minify", + "watch": "npm run build:static && cross-env NODE_ENV=development hugo server --config ./config.toml -D -b localhost:1313 -d ../public --appendPort=false", "watch:gitpod": "npm run build:static && cross-env NODE_ENV=development hugo server --config ./config.toml -D -b `gp url 1313` -d ../public --appendPort=false" }, "devDependencies": { diff --git a/package.json b/package.json index cb45657c..b23663ba 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "watch": "npm run build --workspace core && concurrently -c gray,blue -k -n hugo,tailwind \"npm run watch --workspace hugo\" \"npm run watch --workspace tailwind\"", "watch:gitpod": "npm run build --workspace core && concurrently -c gray,blue -k -n hugo,tailwind \"npm run watch:gitpod --workspace hugo\" \"npm run watch --workspace tailwind\"", "build": "npm run clean && npm run build --workspace core --workspace=tailwind --workspace=hugo", + "preview": "npm run clean && npm run build --workspace core --workspace=tailwind && npm run preview --workspace hugo", "clean": "shx rm -rf public && npm run clean --workspace core --workspace=tailwind" }, "devDependencies": {