atproto utils for zig zat.dev
atproto sdk zig

fix: SPA fallback routing for standard.site deep links

add _redirects with SPA rewrite so Wisp serves index.html for all
paths. app.js converts pathname to hash route on load, making URLs
like /roadmap and /devlog/001 work when linked from search indexes.

also add glibc to nixery deps so patchelf can actually find the
dynamic linker for wisp-cli.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+12
+1
.tangled/workflows/deploy-docs.yml
··· 8 8 nixpkgs: 9 9 - bun 10 10 - curl 11 + - glibc 11 12 - patchelf 12 13 13 14 environment:
+1
site/_redirects
··· 1 + /* /index.html 200
+10
site/app.js
··· 109 109 } 110 110 111 111 async function main() { 112 + // SPA fallback: convert pathname to hash route so deep links work 113 + // e.g. /roadmap -> #roadmap.md, /devlog/001 -> #devlog/001.md 114 + if (location.pathname !== "/" && !location.hash) { 115 + const path = location.pathname.replace(/^\/+/, ""); 116 + if (path) { 117 + location.replace("#" + normalizeDocPath(path)); 118 + return; 119 + } 120 + } 121 + 112 122 if (!globalThis.marked) { 113 123 contentEl.innerHTML = `<p class="empty">Markdown renderer failed to load.</p>`; 114 124 return;