Implements the Foundation → P1 scope: a bilingual (vi default, en under /en/) personal site for Kokone / SkullMute, fully runnable locally. Scaffold & tooling - Astro 7 + @astrojs/cloudflare v14 + Svelte 5 islands + Tailwind v4 (@theme) + self-hosted Fonts API + built-in CSP (Prism highlighting). - eslint (flat) + prettier (+astro/svelte/tailwind) + lefthook + knip; strict TypeScript. Design system & chrome - Runtime-var theming (dark "midnight ink" / light "old paper") via [data-theme]; 4 VN-subset fonts, exactly 2 first-paint preloads. - Waveline signature (requestAnimationFrame — no GSAP), grain overlay. - i18n seam (src/i18n/routing.ts), Header/Footer/MobileTabBar, ThemeToggle, LangSwitch, accessible MenuSheet. Content & pages - Content Collections (Zod): blog, stories, projects, faq, gallery, legal. - Blog (index/post/tag), Stories + reader (content-warning gate, ReadingControls: size + independent reader theme + progress), Home, About, Projects, Q&A, Links, 5 bilingual Legal pages — all with /en/ twins + translationKey pairing. Platform - LegalGateSheet first-visit notice; error pages 404/500/403/429/offline; middleware: security headers, www->apex, denylist->403 & /api rate-limit ->429 served from prerendered assets via the ASSETS binding. Verified locally: build/check/lint/format/knip all pass; 39 pages; CSP console-clean; error matrix under `astro preview`. Perf: HTML ~9KB gz, island JS 25KB gz, 2 font preloads (48KB). Deferred to a later plan: live deploy + domain + secrets, widgets worker (YouTube/Steam/GitHub + KV cron), gallery + exif scripts, Pagefind search, RSS/sitemap/OG images, bug-report pipeline, offline service worker, CI/CD reusable workflows. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
16 lines
343 B
YAML
16 lines
343 B
YAML
pre-commit:
|
|
parallel: true
|
|
commands:
|
|
format:
|
|
glob: "*.{astro,svelte,ts,js,mjs,md,css,json,jsonc,yml,yaml}"
|
|
run: npx prettier --write {staged_files}
|
|
stage_fixed: true
|
|
lint:
|
|
glob: "*.{astro,svelte,ts,js,mjs}"
|
|
run: npx eslint {staged_files}
|
|
|
|
pre-push:
|
|
commands:
|
|
typecheck:
|
|
run: npm run check
|