website/README.md
2026-09-08 19:05:10 -04:00

51 lines
1.7 KiB
Markdown

# zachy.cc — v3
Third pass at the personal site. Astro + the Cloudflare adapter (matches where
v2 is hosted). Calm single-column layout, serif body / mono labels, light + dark
following the OS with a manual toggle.
## Stack
- **Astro 7**, `@astrojs/cloudflare` adapter (mostly static; one on-demand route)
- Self-hosted fonts: Newsreader (body), JetBrains Mono (labels/meta), Unbounded (wordmark)
- No UI framework, minimal client JS
## Layout
```
src/
data/site.ts all copy lives here — bio, work, values, links, buttons
layouts/Base.astro <head>, top bar, footer, theme toggle (no-flash script)
components/
Music.astro "now playing" + "on repeat" shells
CopyEmail.astro click-to-copy with a little tooltip
Webrings.astro hotline + online webrings
Buttons.astro 88x31 wall — images in public/badges/
scripts/music.ts hydrates the music sections from /api/spotify.json
pages/
index.astro
projects.astro placeholder list — swap in real projects
notes/ content collection (src/content/notes/*.md)
api/spotify.json.ts Spotify Web API proxy (on-demand)
```
## Editing
- **Text**: `src/data/site.ts`.
- **Notes**: drop a `.md` in `src/content/notes/` with `title` / `date` / `summary`.
- **Buttons**: add to `buttons` in `site.ts` and put the gif in `public/badges/`.
## Spotify (optional)
`now playing` / `top tracks` need three env vars — see `.dev.vars.example`.
Without them the sections stay hidden and everything else works.
Add `?mockmusic` to any URL to preview those sections with fake data.
## Commands
```
npm run dev # localhost:4321
npm run build
npm run preview # wrangler, runs the built worker
```