#100 public-origin postprocessor rewrites raw and release artifact HTML
What
absolutize_social_meta() walks the whole output tree and rewrites every .html file:
src/build.rs:1312-1334:
path.extension() == "html"std::fs::read_to_string(&path)?- replace
content="https://hu13.gl0w.world/og.png"
That includes committed raw HTML under raw/ and copied release artifacts under releases/<version>/, not just generated pages.
Reproduced
A repo with raw/x.html containing invalid UTF-8:
hu13 build . -o out --public-origin https://example.test
hu13: social meta read out/raw/raw/x.html: stream did not contain valid UTF-8
With valid raw HTML containing content="https://hu13.gl0w.world/og.png", the copied bytes are silently rewritten to the absolute URL. Same for release artifact HTML.
Impact
- A repo with a binary/invalid-UTF-8
.htmlraw file cannot build when--public-originis set. /raw/and release artifact bytes no longer match the source (breaks byte-identical downloads, hashes, and user expectations).
Fix
- Only postprocess generated page paths (or pass the absolute URL when rendering pages).
- Skip
raw/,repo.git/, andreleases/<version>/artifact trees. - Regression test: raw
.htmlinvalid UTF-8 + raw HTML marker survives unchanged; generated page still gets absoluteog:image.
Uunknown ·
Fixed in PR #60 (
8e812dd, merged as67f5fb2) with regression coverage intests/review4_hardening.rsand the Pages inbox tests. f0rge CI run2026-10-27T18-19-28.378320411Zpassed.