pnpm install— Node>=22.12.0required (enginesinpackage.json).pnpm dev— dev server atlocalhost:4321; in OpenCode useastro dev --backgroundand manage withastro dev stop/status/logs.pnpm build→dist/|pnpm preview— static site, no SSR.pnpm astro ...— CLI passthrough (astro add,astro check).
- Astro 7 +
@astrojs/react(React 19 islands) + Tailwind v4 via@tailwindcss/vite(notailwind.config.*). - shadcn
base-nova— config incomponents.json, CSS entrysrc/styles/global.css(@import "tailwindcss"+@import "shadcn/tailwind.css").
- Path alias
@/*→src/*(tsconfig.jsonpaths+components.jsonaliases:components,lib,ui,hooks). src/lib/utils.tsre-exportscnfrom thecnpackage — don't replace with localclsx/twMergeimpl.- Add shadcn components with
pnpm dlx shadcn@latest add <component>; style/CSS vars live insrc/styles/global.css. - Theme:
src/layouts/BaseLayout.astroinline<script is:inline>readslocalStorage.theme/prefers-color-scheme, togglesdocument.documentElement.dark, andMutationObserversyncs back tolocalStorage.src/components/ModeToggle.tsxmust mutate the same class — keep in sync. - Static assets in
public/cdin-icons/served at/cdin-icons/...— reference as/cdin-icons/...never/public/...(build breaks otherwise).
dist/and.astro/are generated and gitignored — don't edit or commit.- GitHub Pages repo (
cdin-editor/cdin-editor.github.io) —pnpm buildmust pass, no server/env to configure.