Files
captoys/potluck/CONTRIBUTING.md
T
dckc 8a812d76e3 potluck: README sells and gets to TADA; CONTRIBUTING has the rest
The README was EmDash's template blurb. Now it says what potluck is
and its first block runs from a fresh clone to /issues, using a new
`pnpm seed:issues` script that applies seed/issues.json to the local
D1 database. CONTRIBUTING covers how it's put together, seeds, checks,
the EmDash rules, and deploying; the template's stale notes (Inter,
three-column articles) are gone. AGENTS.md is now a symlink to it.

Generated-by: Claude Opus 5.5
2026-10-09 01:24:10 -05:00

3.3 KiB

Contributing to potluck

potluck started as EmDash's cloudflare:blog template (pnpm create emdash@latest); it's part of the capsite goal tree, where it is the site that publishes the weekly roundup.

How it's put together

  • Issues are the issues collection (seed/issues.json): title, week (an ISO week, 2026-W40), dek (one-line summary), body (Portable Text). The slug is the week, lowercased: /issues/2026-w40. issues-sketch.md is the dry run behind the three sample issues: real public bookmarks, editorial lines marked draft.
  • Pages: home and /issues list issues (src/pages/issues/); /tag/<tag> lists issues by diigo tag; search and /rss.xml cover issues. The posts collection and its pages are the template's, still in place.
  • Microformats: an issue list is an h-feed of h-entrys; an issue is an h-entry (p-name, dt-published, p-summary, e-content). In issue bodies, CiteLink.astro marks off-site links as h-cite and /tag/<tag> links as rel-tag p-category.
  • Look: plain HTML, after kmjn.org's Plain HTML with a few bureaucratic gestures: system fonts (no webfonts), one ~800px column, links in the text color with a dotted underline. Restyle in src/styles/theme.css, which overrides the defaults in tokens.css (unlayered, so it always wins); don't edit tokens.css or Base.astro for visual changes. Colors use light-dark(<light>, <dark>).

Seeds

seed/seed.json (site settings, menus, widgets, the template's collections) is applied on the first request to an empty database. seed/issues.json is separate: pnpm seed:issues applies it to the local D1 database, which exists after the dev server's first request. Run it with the dev server stopped.

Checks

pnpm typecheck     # astro check
pnpm build

EmDash rules

  • All content pages are server-rendered (output: "server"); no getStaticPaths() for CMS content.
  • Image fields are objects ({ src, alt }), not strings; render with <Image image={...} /> from "emdash/ui".
  • entry.id is the slug (for URLs); entry.data.id is the database ULID (for API calls like getEntryTerms).
  • When Astro's cache is enabled, pass query hints to Astro.cache.set(cacheHint).
  • Taxonomy names in queries match the seed's "name" exactly ("tag", not "tags").
  • npx emdash types regenerates emdash-env.d.ts from a running site (the dev server also regenerates it on start).

The EmDash docs are an MCP server at https://docs.emdashcms.com/mcp (wired up in .mcp.json, .cursor/mcp.json, .vscode/mcp.json). Check them rather than recalling APIs from memory.

Deploying

pnpm wrangler login
pnpm deploy

The first deploy provisions the D1 database and R2 bucket named in wrangler.jsonc. See Deploy to Cloudflare.

For agents

AGENTS.md is a symlink to this file. capsite's working rules apply here too (the dev server is the user's to start and stop). EmDash skills are in .agents/skills/: building-emdash-site (start here), creating-plugins, emdash-cli.