site

personal website, served at mordaunt.dev/site
Log | Files | Refs

commit 826badc831a87b4da6f77912d3e9bf315e44935d
parent 26ca239ce05d3e54239990cb5afff5ab4daaf263
Author: Jack Mordaunt <jackmordaunt.dev@gmail.com>
Date:   Thu, 24 Sep 2026 16:49:22 -0300

builds: serve the alias a copy built for the alias

jackmordaunt.com is sourcehut pages serving this site at its root, while
hugo.toml names mordaunt.dev/site/ as the base. A Hugo site bakes that
base into every path it emits, so since the move the alias has been
asking for /site/css/... at a root that has no /site - the stylesheets,
fonts and images all 404 and the pages render unstyled.

The build that feeds pages therefore overrides the base, and content
stops naming /site itself: canonifyURLs resolves the project pages'
screenshots against whichever base built them, so one tree is correct in
both places. mordaunt.dev is unaffected - the server builds the site
itself from this repository as a flake input and never takes this
tarball.

All of it goes away when the alias's DNS moves to the server and becomes
the path-preserving redirect its Caddyfile block is already written for.

Diffstat:
M.builds/publish.yml | 12+++++++++++-
Mcontent/projects/icnsify.md | 12++++++------
Mcontent/projects/plato-desktop-client.md | 18+++++++++---------
Mhugo.toml | 7+++++++
4 files changed, 33 insertions(+), 16 deletions(-)

diff --git a/.builds/publish.yml b/.builds/publish.yml @@ -6,7 +6,17 @@ packages: tasks: - package: | cd site - hugo + # Built against jackmordaunt.com, not the baseURL in hugo.toml, because + # a Hugo site bakes its baseURL into every asset path it emits and this + # tarball is served at the root of the alias. The canonical home is + # mordaunt.dev/site/, which the server builds for itself from this + # repository as a flake input and does not take from here - so the + # config keeps that URL and only this one build overrides it. + # + # This goes away when jackmordaunt.com's DNS moves to the server: the + # alias is then a path-preserving redirect into mordaunt.dev/site/ and + # there is only one copy of the site again. + hugo -b https://jackmordaunt.com/ tar -C public -cvz . > ../site.tar.gz - upload: | hut pages publish -d jackmordaunt.srht.site site.tar.gz diff --git a/content/projects/icnsify.md b/content/projects/icnsify.md @@ -15,8 +15,8 @@ categories = ["development"] </style> <div class="carousel"> - <img src="/site/images/icnsify/icns-macos-preview.webp" alt="icnsify-preview macOS" /> - <img src="/site/images/icnsify/icns-windows-preview.webp" alt="icnsify-preview Windows" /> + <img src="/images/icnsify/icns-macos-preview.webp" alt="icnsify-preview macOS" /> + <img src="/images/icnsify/icns-windows-preview.webp" alt="icnsify-preview Windows" /> </div> ## icnsify: A Lean, Cross-Platform Icon Tool for macOS `.icns` Format @@ -61,10 +61,10 @@ toolchain. <div style="display: flex; flex-wrap: wrap; gap: 2rem;"> <a href="https://github.com/fyne-io"> - <img style="max-height: 100px; border-radius: 8px;" src="/site/images/brands/fyne-io.webp" alt="Fyne"/> + <img style="max-height: 100px; border-radius: 8px;" src="/images/brands/fyne-io.webp" alt="Fyne"/> </a> <a href="https://github.com/wailsapp/wails"> - <img style="max-height: 100px;" src="/site/images/brands/wails.webp" alt="Wails"/> + <img style="max-height: 100px;" src="/images/brands/wails.webp" alt="Wails"/> </a> </div> @@ -79,12 +79,12 @@ toolchain. ### Languages <div style="display: flex; flex-wrap: wrap; gap: 2rem;"> - <img style="max-height: 100px;" src="/site/images/brands/go.svg"/> + <img style="max-height: 100px;" src="/images/brands/go.svg"/> </div> ### Tech <div style="display: flex; flex-wrap: wrap; gap: 2rem;"> - <img style="max-height: 100px;" src="/site/images/brands/gio.svg" class="invert-me"/> + <img style="max-height: 100px;" src="/images/brands/gio.svg" class="invert-me"/> </div> diff --git a/content/projects/plato-desktop-client.md b/content/projects/plato-desktop-client.md @@ -16,9 +16,9 @@ categories = ["development"] </style> <div class="carousel"> - <img src="/site/images/Plato/PlatoHome.webp" alt="Home Page" /> - <img src="/site/images/Plato/PlatoGame.webp" alt="Game Page" /> - <img src="/site/images/Plato/PlatoMulti.webp" alt="Multi Window" /> + <img src="/images/Plato/PlatoHome.webp" alt="Home Page" /> + <img src="/images/Plato/PlatoGame.webp" alt="Game Page" /> + <img src="/images/Plato/PlatoMulti.webp" alt="Multi Window" /> </div> @@ -66,16 +66,16 @@ This project demanded **low-level systems programming**, **high-concurrency arch ### Languages <div style="display: flex; flex-wrap: wrap; gap: 2rem;"> - <img style="max-height: 100px;" src="/site/images/brands/go.svg"/> - <img style="max-height: 100px;" src="/site/images/brands/c.png"/> + <img style="max-height: 100px;" src="/images/brands/go.svg"/> + <img style="max-height: 100px;" src="/images/brands/c.png"/> </div> ### Tech <div style="display: flex; flex-wrap: wrap; gap: 2rem;"> - <img style="max-height: 100px;" src="/site/images/brands/gio.svg" class="invert-me"/> - <img style="max-height: 100px;" src="/site/images/brands/sqlite.svg"/> - <img style="max-height: 100px;" src="/site/images/brands/opengl.svg"/> - <img style="max-height: 100px;" src="/site/images/brands/v8.svg"/> + <img style="max-height: 100px;" src="/images/brands/gio.svg" class="invert-me"/> + <img style="max-height: 100px;" src="/images/brands/sqlite.svg"/> + <img style="max-height: 100px;" src="/images/brands/opengl.svg"/> + <img style="max-height: 100px;" src="/images/brands/v8.svg"/> </div> diff --git a/hugo.toml b/hugo.toml @@ -1,6 +1,13 @@ baseurl = "https://mordaunt.dev/site/" title = "Jack Mordaunt" theme = "hugo-coder" +# Content is written with root-relative image paths, and this site is +# served from a subdirectory on mordaunt.dev and from the root on +# jackmordaunt.com. canonifyURLs resolves those paths against whichever +# baseURL the build was given, so one source tree is correct in both +# places; without it the project pages 404 their screenshots on one of +# them, whichever way the paths are written. +canonifyURLs = true languagecode = "en" defaultcontentlanguage = "en"