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/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/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": {