58 lines
2.2 KiB
Markdown
58 lines
2.2 KiB
Markdown
# benjaminpalko.ca
|
|
|
|
Personal website and blog for Benjamin Palko, built with SvelteKit and deployed on Netlify.
|
|
|
|
## Stack
|
|
|
|
- SvelteKit 5 / Svelte 5
|
|
- TypeScript (strict)
|
|
- Tailwind CSS 4 + daisyUI
|
|
- mdsvex markdown for blog posts
|
|
- pino (server-side logging)
|
|
- `@lucide/svelte` icons
|
|
|
|
## Prerequisites
|
|
|
|
- [mise](https://mise.jdx.dev) (or Node + the pnpm version pinned in `mise.toml`)
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
pnpm install
|
|
```
|
|
|
|
## Development
|
|
|
|
```bash
|
|
pnpm dev # start dev server
|
|
pnpm dev --open # start dev server and open the app in a browser
|
|
```
|
|
|
|
## Scripts
|
|
|
|
| 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) |
|
|
|
|
## Blog
|
|
|
|
Posts live at `src/lib/posts/*.md` as mdsvex markdown. Follow `src/lib/posts/template.md.sample` for frontmatter (`title`, `description`, `image`, `date`, `categories`, `published`). Categories are one of `development`, `work`, `life`. The slug is the filename; only posts with `published: true` appear on the site.
|
|
|
|
See `AGENTS.md` for the full authoring workflow.
|
|
|
|
## Deployment
|
|
|
|
The site deploys to Netlify on every push to `main` via a Forgejo Actions workflow (`.forgejo/workflows/deploy.yml`): it installs with pnpm, runs `pnpm build`, and deploys the `build/` directory with `netlify-cli`. Requires `NETLIFY_AUTH_TOKEN` and `NETLIFY_SITE_ID` configured as repository secrets in Forgejo. Netlify's GitHub-app continuous deployment is disabled.
|
|
|
|
The GitHub Actions PR gate (`.github/workflows/pr.yml`) runs on the GitHub mirror on every pull request using `pnpm`. Before shipping, verify locally with:
|
|
|
|
```bash
|
|
pnpm lint && pnpm check && pnpm test && pnpm build
|
|
```
|