usemagpie.ai/docs/contributors, /docs/zh/contributors and
/docs/ja/contributors list each person the release notes' thanks line
would (the previous commit's rules), with the versions their reports,
ideas or code went into, newest first: three shown, the rest under
"N more", each linking its release. A name with a known GitHub login
links it; the platform a report came from (Discord, X, …) sits under it.
How it is built: wrangler.jsonc's build runs `node credits-cli.mjs wall`
at each deploy. It reads every tag's commits from git, the issue authors
from GitHub (reusing the last build's answers), and writes
public/contributors.json and the table in each language,
public/contributors/{en,zh,ja}.html (gitignored). worker.js puts that
table into the page's #wall with HTMLRewriter; without it the page keeps
a line pointing at the release notes. A build that can't read git leaves
the last list. The page says how names are found (only as already public
in the history, no emails, no maintainer, agents or bots) and how to be
left off: Discord, an issue, or a PR to site/contributors-exclude.txt.
Every docs page's footer and the home page's (foot.contrib in zh, ja, de)
link it. Styles reuse docs.css's table and tokens.
Run (mote, node 22): node --test site/*.test.mjs 77/77. The wall on a
clone of origin/main c991733d with a real token: 1338 people over 5933
released commits in 19s, ~1MB of table a language, no email address in
it.
Broken by hand: withWall matching /docs/contributors only → the
injection test red on /docs/zh/contributors; ja/docker.html's footer link
removed → the footer test red on it.
Not tried: the page in a browser before deploy (the worker's rewriter is
stood in for in the test; the deployed pages are checked after).
26 lines
1.0 KiB
JSON
26 lines
1.0 KiB
JSON
// usemagpie.ai: the static site in public/, plus worker.js for the update
|
|
// feed and the download links. Deploy with `npx wrangler deploy` from here.
|
|
{
|
|
"name": "usemagpie",
|
|
"main": "worker.js",
|
|
"compatibility_date": "2026-09-01",
|
|
// the contributors page's list, from git history (credits-cli.mjs); a
|
|
// build that can't read git or GitHub keeps the last list, or none
|
|
"build": { "command": "node credits-cli.mjs wall" },
|
|
"assets": {
|
|
"directory": "./public",
|
|
"binding": "ASSETS",
|
|
// every request, so worker.js can send www.usemagpie.ai to usemagpie.ai
|
|
"run_worker_first": true
|
|
},
|
|
"routes": [
|
|
{ "pattern": "usemagpie.ai", "custom_domain": true },
|
|
{ "pattern": "www.usemagpie.ai", "custom_domain": true }
|
|
],
|
|
// the ledger of releases the Stable channel is chosen from (worker.js,
|
|
// "The Stable channel"), kept by the cron every quarter hour
|
|
"kv_namespaces": [{ "binding": "LEDGER", "id": "716b22ec7d4c496abb7b3dc085258fde" }],
|
|
"triggers": { "crons": ["*/15 * * * *"] },
|
|
"observability": { "enabled": true }
|
|
}
|