diff --git a/.github/workflows/wiki.yml b/.github/workflows/wiki.yml index 3a2e54d6b..92fda9dcf 100644 --- a/.github/workflows/wiki.yml +++ b/.github/workflows/wiki.yml @@ -178,7 +178,7 @@ jobs: # build (and only this one — the test job keeps the local root base) # compiles with the full Pages URL. Zola 0.23 has no config # env-var expansion, so the value is rewritten in the pipeline. - run: sed -i 's|^base_url = .*|base_url = "https://openperpetuum.github.io/Wiki"|' config.toml + run: sed -i 's|^base_url = .*|base_url = "https://openperpetuum.github.io/wiki"|' config.toml - name: Build # Zola 0.23 builds from the current directory (no -d flag); the @@ -189,7 +189,7 @@ jobs: # The source targets the domain root (base_url "/", so local and the # test job share the output); Zola 0.23 does not rewrite # site-absolute links, so prefix them with the /Wiki path here. - run: python3 tools/rewrite_site_base.py public https://openperpetuum.github.io/Wiki + run: python3 tools/rewrite_site_base.py public https://openperpetuum.github.io/wiki - name: Upload artifact uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # ratchet:actions/upload-pages-artifact@v3 diff --git a/config.toml b/config.toml index c952a2679..1b437fff6 100644 --- a/config.toml +++ b/config.toml @@ -6,7 +6,7 @@ title = "Open Perpetuum Wiki" description = "Player and developer reference for the Open Perpetuum server: what you can do in the game, entity stats, zone generation, and stat field semantics." # Local/test base: the site lives at the domain root. The CI DEPLOY build # rewrites this to the GitHub Pages project URL (a subpath — -# openperpetuum.github.io/Wiki/), see .github/workflows/wiki.yml; Zola 0.23 +# openperpetuum.github.io/wiki/), see .github/workflows/wiki.yml; Zola 0.23 # has no config env-var expansion, so the override happens in the pipeline. base_url = "/" generate_feeds = false diff --git a/tools/rewrite_site_base.py b/tools/rewrite_site_base.py index ab0bd514e..069a7c2fb 100755 --- a/tools/rewrite_site_base.py +++ b/tools/rewrite_site_base.py @@ -3,14 +3,14 @@ The site is written against the domain root (base_url = "/") so local development and the test job see the same output. GitHub Pages serves a -PROJECT site under a subpath (openperpetuum.github.io/Wiki/), and Zola 0.23 +PROJECT site under a subpath (openperpetuum.github.io/wiki/), and Zola 0.23 does NOT rewrite site-absolute links ("/style.css", "/zones/...") — only the sitemap's canonical URLs pick up base_url. This pass prefixes every href="/..." and src="/..." in the built HTML/SVG with the base's path part ("/Wiki") so the same build works under the subpath. Usage: python3 tools/rewrite_site_base.py - python3 tools/rewrite_site_base.py public https://openperpetuum.github.io/Wiki + python3 tools/rewrite_site_base.py public https://openperpetuum.github.io/wiki Idempotent: values already carrying the path part are left alone. Protocol links ("//cdn..."), data: URIs, hashes and relative links never match.