Some checks failed
Deploy / deploy (push) Failing after 39s
Co-authored-by: Benjamin Palko <benjaminpalko@hotmail.com> Reviewed-on: #5
61 lines
2.7 KiB
Markdown
61 lines
2.7 KiB
Markdown
# 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 `highlight` hook that renders fenced code via `Components.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 to `main`. It installs with `pnpm install --frozen-lockfile` so 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 to `main`. It needs `NETLIFY_AUTH_TOKEN` and `NETLIFY_SITE_ID` as Forgejo repo secrets. It also installs with `pnpm 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:
|
|
|
|
```bash
|
|
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 format` will fix formatting.
|
|
- Svelte 5 runes (`$state`, `$props`, etc.).
|
|
- Path alias `$lib` maps to `src/lib`.
|
|
|
|
## Blog / posts
|
|
|
|
- Posts live at `src/lib/posts/*.md` and are written in mdsvex markdown.
|
|
- Follow `src/lib/posts/template.md.sample` for the frontmatter shape: `title`, `description`, `image` (`url`/`alt`), `date`, `categories`, `published`.
|
|
- `categories` must be one of `'development' | 'work' | 'life'` (see `src/lib/posts/index.ts`).
|
|
- The slug is the filename (dynamic import in `src/routes/blog/[slug]/+page.ts`).
|
|
- Only posts with `published: true` appear on the site.
|
|
- Fenced code blocks use the mdsvex highlighter via `Components.pre` — mind the configured highlight hook in `svelte.config.js`.
|
|
|
|
## Theming / assets
|
|
|
|
- Static assets live in `static/`.
|
|
- App-wide styles are in `src/app.css`.
|