2.7 KiB
2.7 KiB
AGENTS.md
Project context for AI coding agents working in this repository.
Project
Personal website and blog for Benjamin Palko, deployed on Netlify.
- Framework: SvelteKit 5 / Svelte 5
- Language: TypeScript (strict)
- Styling: Tailwind CSS 4 + daisyUI
- Markdown/blogging: mdsvex with a custom
highlighthook that renders fenced code viaComponents.pre code={...} - Logging: pino (server side)
- Icons:
@lucide/svelte
Toolchain
- pnpm is the canonical local package manager.
- The PR gate runs via Forgejo Actions (
.forgejo/workflows/pr.yml) on pull requests tomain. It installs withpnpm install --frozen-lockfileso CI matches a clean local install. Keep both working; document pnpm commands. - Deploys to Netlify run via Forgejo Actions (
.forgejo/workflows/deploy.yml) on push tomain. It needsNETLIFY_AUTH_TOKENandNETLIFY_SITE_IDas Forgejo repo secrets. It also installs withpnpm install --frozen-lockfile.
Scripts (pnpm)
| Command | What it does |
|---|---|
pnpm dev |
Start dev server |
pnpm build |
Production build |
pnpm preview |
Preview the production build |
pnpm check |
svelte-kit sync + svelte-check (typecheck) |
pnpm lint |
Prettier check + ESLint |
pnpm format |
Prettier write |
pnpm test:unit |
Vitest (watch mode) |
pnpm test |
Vitest (single run) |
Before finishing any work, run:
pnpm lint && pnpm check && pnpm test && pnpm build
This mirrors the existing PR gate.
Code style
- Prettier + ESLint (flat config) with Svelte and Tailwind plugins.
pnpm formatwill fix formatting. - Svelte 5 runes (
$state,$props, etc.). - Path alias
$libmaps tosrc/lib.
Blog / posts
- Posts live at
src/lib/posts/*.mdand are written in mdsvex markdown. - Follow
src/lib/posts/template.md.samplefor the frontmatter shape:title,description,image(url/alt),date,categories,published. categoriesmust be one of'development' | 'work' | 'life'(seesrc/lib/posts/index.ts).- The slug is the filename (dynamic import in
src/routes/blog/[slug]/+page.ts). - Only posts with
published: trueappear on the site. - Fenced code blocks use the mdsvex highlighter via
Components.pre— mind the configured highlight hook insvelte.config.js.
Theming / assets
- Static assets live in
static/. - App-wide styles are in
src/app.css.