What I learned. My build generates a share card per post, then verifies every page’s card actually exists on disk. The check read the location straight out of the page metadata — where it is URL-encoded — and tested that string against the filesystem. One post with a non-ASCII character in its slug, and the whole build failed claiming a card was missing that was sitting right there.
Decode before you touch the disk. An encoded web location and a filename are different alphabets, and a check that confuses them fails on exactly the content least likely to appear in my test fixtures.