···11+---
22+title: Page Not Found
33+---
44+55+The page you have requested could not be found. 🤷
+113
AGENTS.md
···11+# AGENTS.md
22+33+Guidance for agents working on this repository.
44+55+## What this is
66+77+A personal website at [rorylawless.com](https://rorylawless.com). It is a static site built with [Quarto](https://quarto.org), hosted on Cloudflare Workers. Content is written in `.qmd` (Quarto Markdown) files. Posts that include R code use `renv` for reproducible dependency management.
88+99+**Agents are not expected to help with writing or editing content.** Work here is focused on look and feel, infrastructure, and tooling.
1010+1111+---
1212+1313+## Tech stack
1414+1515+| Layer | Tool |
1616+|---|---|
1717+| Site framework | Quarto |
1818+| Styling | Custom SCSS (`assets/custom.scss`), no Quarto theme (`theme: none`) |
1919+| Hosting | Cloudflare Workers (static assets via Wrangler) |
2020+| CI/CD | GitHub Actions (`.github/workflows/deploy.yml`) |
2121+| R environment | renv |
2222+| Analytics | Simple Analytics |
2323+2424+---
2525+2626+## Repository layout
2727+2828+```
2929+_quarto.yml # Master site configuration (colors, fonts, navbar, output dir)
3030+assets/
3131+ custom.scss # All custom styles — primary target for look and feel changes
3232+ template.ejs # EJS template for the post listing on the homepage
3333+html/
3434+ analytics.html # Simple Analytics script injection
3535+posts/ # Blog posts, each in its own subdirectory with index.qmd
3636+ _metadata.yml # Shared frontmatter defaults for all posts
3737+.well-known/ # PGP key and security.txt
3838+_redirects # Cloudflare redirect rules
3939+_headers # Cloudflare response header rules
4040+wrangler.jsonc # Cloudflare Workers deployment config
4141+package.json # Node deps (just wrangler)
4242+renv.lock # Locked R package versions
4343+.github/workflows/
4444+ deploy.yml # Build and deploy pipeline
4545+```
4646+4747+Output goes to `_site/` (generated, not committed). The `_freeze/` directory caches R code execution results and is committed.
4848+4949+---
5050+5151+## Design system
5252+5353+**Colors** (defined in `_quarto.yml`):
5454+- Navbar background: `#24617a` (teal)
5555+- Navbar / footer text: `#fbf5f5` (off-white)
5656+- Body text: `#070a0c`
5757+- Links: `#183e4d`
5858+5959+**Fonts** (loaded from Google Fonts in `assets/custom.scss`):
6060+- Body: Lato
6161+- Navbar title: Playfair Display
6262+6363+**Layout**: Max content width is controlled via `.navbar-container { width: 820px }` in `custom.scss`. The navbar title uses `font-size: 4vw` (viewport-relative).
6464+6565+When changing look and feel, `assets/custom.scss` and `_quarto.yml` are the two files to focus on. Do not introduce a Quarto theme — the site intentionally uses `theme: none`.
6666+6767+---
6868+6969+## Build and deploy
7070+7171+The site is never built locally — CI handles it. The full pipeline on push to `main`:
7272+7373+1. Restore cached `_freeze/` and `node_modules/`
7474+2. Set up R + renv (restores packages from `renv.lock`)
7575+3. Run `quarto render` → outputs to `_site/`
7676+4. Run `wrangler deploy` → uploads `_site/` to Cloudflare Workers
7777+7878+Secrets required: `CLOUDFLARE_ACCOUNT_ID`, `CLOUDFLARE_API_TOKEN` (stored in GitHub Actions).
7979+8080+To preview changes locally you would need Quarto and R installed, then `quarto preview`. Agents working in this environment should not attempt to run the full build.
8181+8282+---
8383+8484+## Cloudflare configuration
8585+8686+`wrangler.jsonc` defines:
8787+- Static assets served from `_site/`
8888+- `not_found_handling: "single-page-application"` — all 404s fall back to `index.html`
8989+- `html_handling: "auto-trailing-slash"` — URL normalisation
9090+- `placement: { mode: "smart" }` — Cloudflare automatic edge placement
9191+- Custom domain: `rorylawless.com`
9292+9393+URL redirects live in `_redirects` (Cloudflare syntax). Response headers live in `_headers`.
9494+9595+---
9696+9797+## Conventions
9898+9999+- Post directories use kebab-case naming (e.g., `posts/the-basics-of-duckdb-in-r/`)
100100+- Dates throughout are ISO 8601 (`2025-03-30`)
101101+- Reusable content snippets use Quarto's `{{< include >}}` shortcode
102102+- Draft posts are hidden via `drafts: gone` in `_quarto.yml`
103103+- Do not add search, categories, or sort UI to the post listing — the site is intentionally minimal
104104+105105+---
106106+107107+## What to avoid
108108+109109+- Do not introduce a Quarto theme (Bootstrap-based) — styling is intentionally from scratch
110110+- Do not add JavaScript frameworks or bundlers
111111+- Do not commit the `_site/` output directory
112112+- Do not edit `.qmd` content files — content is out of scope for agents
113113+- Do not modify `renv.lock` manually — R package changes go through `renv`