Skip to content

About

A source of monica-dev.com

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

monica-dev.com

This is my portfolio website. It's built with Astro and Cloudflare Pages.

Website URL: https://monica-dev.com

Development

Install the project toolchain with mise (Node.js 24.22.1 and the pnpm version pinned in package.json), then install dependencies:

mise trust
mise install
mise exec -- pnpm install

Run the portfolio development server:

mise run dev

Build the static site, including optimized images and OGP images:

mise run build

Preview the production build with mise run preview. The .node-version files keep hosting environments aligned with the Node.js version in mise.toml.

Work hero images live in apps/portfolio/src/assets/works/<work-id>/hero.png. Astro generates responsive WebP images for the work list and article pages. Keep directly linked media, such as videos, in public/assets.

OGP images are generated from Content Collections through a static endpoint at /assets/ogp/[...image].png. Updating a title, background, font, or rendering code takes effect on the next build without a separate generation command or cache reset.

Link cards are rendered into article HTML at build time. Internal cards use Content Collections; external metadata is fetched from the embed service and cached for seven days in apps/portfolio/.cache/link-cards. Failed refreshes keep stale metadata or the original link label. Clear this directory to force a refresh.

The portfolio uses Gen Interface JP for text, controls, and OGP images. Inline code and code blocks use the operating system’s monospace fonts.

Toolchain and checks

The portfolio runs on Astro 7 and Vite 8 (Rolldown/Oxc). Oxlint handles linting, Oxfmt formats source files including Astro and Vue, and TypeScript 7 checks the TypeScript projects. Slidev builds both decks with Vite 8; its build script runs with Node's native TypeScript support.

mise run check
mise exec -- pnpm build
mise run stop

Astro template diagnostics currently require TypeScript 6 because the stable Astro language service does not support TypeScript 7's compiler API yet. packages/template-check isolates this compatibility dependency; it checks the portfolio's .astro templates without downgrading the main TypeScript 7 toolchain. Remove this package when Astro's TypeScript 7 integration is released. pnpm typecheck runs both checks.

The Markdown extensions use Astro 7's supported unified() processor API. Gen Interface JP is served through Astro's Fonts API; the existing 400/500/600 Japanese subsets and their Unicode ranges are preserved in apps/portfolio/src/assets/fonts/gen/variants.json.

The navigation uses native Popover behavior, theme changes use View Transitions, and the table of contents cleans up its observer through a custom element's DOM lifecycle. Reduced-motion preferences are respected.

Security overrides in pnpm-workspace.yaml keep vulnerable upstream pins on fixed DOMPurify, Undici, Zod, image-size, and KaTeX releases. The image-size major upgrade is also checked with a PPTX export containing an embedded PNG. Revisit these overrides when their consumers update their own dependency ranges.

Section and details directives use standard MDAST-to-HAST properties without custom node types or handlers. GitHub-style alerts use a small local rehype transform that preserves the body and inline markup. NOTE, TIP, IMPORTANT, WARNING, and CAUTION are supported.

The embed Worker's types are generated by wrangler types from its compatibility date, flags, and bindings. pnpm --filter ogp-fetch-worker types regenerates worker-configuration.d.ts; the Worker's typecheck script does this automatically. The generated file is ignored instead of maintaining a separate Workers type version.

About

A source of monica-dev.com

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages