Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

This repo is a single static **Astro** blog (`austinabbott.dev`, package name `dev-blog`), deployed to Cloudflare Pages. There is no backend, database, or other service — the only "service" is the Astro dev/build process. Commands are the npm scripts in `package.json` (`dev`/`start`, `build`, `preview`, `astro`).

- Node: `.nvmrc` pins Node `24.18.0`, which is installed and set as the nvm default. A login shell (`bash -lc '...'`) picks up Node 24 automatically. Astro 6 also works on the base Node 22, so either is fine.
- Node: `.nvmrc` pins Node `24.18.0`, which is installed and set as the nvm default. A login shell (`bash -lc '...'`) picks up Node 24 automatically. Astro 7 also works on the base Node 22, so either is fine.
- Run dev: `npm run dev` serves the site at `http://localhost:4321/` with hot reload. Editing/adding Markdown under `src/content/blog/` is the core "content authoring" flow and hot-reloads into the blog index and post pages.
- Build: `npm run build` runs `astro check` (type check) first, then `astro build` into `dist/`. This is the closest thing to a lint step — there is **no ESLint/Prettier** configured, and there is **no test framework** (no test command exists).
- Build: `npm run build` runs `astro check` (type check) first, then `astro build` into `dist/`. This is the closest thing to a lint step — there is **no ESLint/Prettier** configured.
- Visual regression: `npm run test:visual` runs Playwright screenshot comparisons against baselines in `tests/visual.spec.ts-snapshots/` (requires a prior Chromium install via `npx playwright install chromium`). Update baselines with `npm run test:visual:update`.
- Preview production build: `npm run preview` serves `dist/` (requires a prior build).
- Non-obvious: `npm install` under npm 11+ prints a benign `allow-scripts` warning that `esbuild` and `sharp` install scripts were skipped. This does **not** break anything — `sharp` image optimization works via prebuilt `@img/sharp-*` platform packages, confirmed by a successful `npm run build`. Do not attempt interactive `npm approve-scripts`.
- Astro 7 notes for this project: no remark/rehype plugins (Sätteri default Markdown processor is fine), no `src/fetch.ts`, and content schemas should import `z` from `astro/zod` (not `astro:content`).
3 changes: 2 additions & 1 deletion src/content.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineCollection, z } from 'astro:content';
import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';
import { z } from 'astro/zod';

const blog = defineCollection({
loader: glob({ base: './src/content/blog', pattern: '**/*.{md,mdx}' }),
Expand Down
Loading