Personal site and writing, built with Astro and published to GitHub Pages.
npm ci
npm run dev # http://localhost:4321
npm run verify # type check, build, then scripts/check-dist.ts
npm run og # build, then render link-preview cards into public/og/verify is what CI runs. scripts/check-dist.ts fails the build on broken internal links or anchors, em dashes in prose, internal details that shouldn't be published, lockfile URLs that aren't on registry.npmjs.org, and pages whose link-preview image is missing.
Link-preview cards (1200x630) are rendered from each page's own title and scene by scripts/og.ts and committed, so CI needs no browser. Rerun npm run og after changing a title, description or scene. It needs Chromium once: npx playwright install chromium.
To render only one page, use npm run og -- --slug engineering-the-next-level. To use an already-installed browser instead of Playwright's Chromium, add --channel msedge (Microsoft Edge) or --channel chrome (Google Chrome).
src/content/posts/holds post metadata (frontmatter). New posts can be plain Markdown here; the renderer applies paragraph, figure and heading spacing through the.post-bodywrapper.- The home page's Writing section uses illustrated cards, newest first, with each series grouped into one card dated from its first part. Cards reuse the title scene fragments. Posts marked
draft: trueappear in local development, but are excluded from production pages, lists and RSS. src/fragments/holds hand-built HTML bodies (inline SVG diagrams) for posts that need them, matched to a post by path.- Title illustrations use a sibling
_scene-<post-name>.htmlfragment, including standalone posts. A post's frontmattertocadds the right-hand contents navigation; eachidmust match a heading anchor. src/data/site.tsholds site and series settings..github/workflows/deploy.ymlbuilds on every push and PR, and deploysmainto Pages once the repo is public.