Repository navigation
Expand file tree
/
Copy pathwrangler.toml
More file actions
70 lines (66 loc) · 3.09 KB
/
Copy pathwrangler.toml
File metadata and controls
70 lines (66 loc) · 3.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Cloudflare Pages — bindings for specification.website.
#
# Pages itself is deployed via the Pages dashboard's Git integration (see
# CLAUDE.md). This file only carries the bindings the Functions in
# /functions/ need; they're picked up at build time on the Pages side.
#
# The MCP Worker in /mcp/ has its own wrangler.toml — deploy it separately
# with `cd mcp && npm run deploy`.
name = "specification-website"
compatibility_date = "2026-05-29"
pages_build_output_dir = "./dist"
# Analytics Engine datasets for the /admin/stats dashboard.
# AGENT_LOG is written by functions/_shared/bot-detect.ts (crawler traffic);
# REPORT_LOG is written by functions/reports.ts (browser Reporting API uploads);
# MCP_LOG is written by mcp/src/index.ts in the separate Worker
# (mcp.specification.website). The dashboard queries all at the account
# level via the Cloudflare Analytics Engine SQL API.
[[analytics_engine_datasets]]
binding = "AGENT_LOG"
dataset = "sw_agent_log"
[[analytics_engine_datasets]]
binding = "REPORT_LOG"
dataset = "sw_report_log"
# D1 — WebSub subscription store, read/written by functions/websub.ts.
#
# COMMENTED OUT UNTIL THE DATABASE EXISTS. The hub returns 503 without this
# binding, so the site deploys and behaves normally in the meantime.
#
# ---------------------------------------------------------------------------
# GO-LIVE CHECKLIST for the WebSub hub. Do all of it in one commit, so the site
# never advertises a hub it cannot serve — a rel="hub" link with nothing behind
# it is the exact failure /spec/foundations/websub/ warns about.
#
# 1. Create the database and note the id it prints:
# npx wrangler d1 create specification-website-websub
#
# 2. Paste that id below and uncomment the [[d1_databases]] block.
#
# 3. Apply the schema:
# npx wrangler d1 migrations apply specification-website-websub --remote
#
# 4. Add the WEBSUB_PUBLISH_SECRET Pages secret (Settings → Variables and
# Secrets, Production + Preview) — the bearer token that authorises
# hub.mode=publish. Add the same value as a GitHub Actions repo secret of
# the same name, which .github/workflows/websub-ping.yml reads.
#
# 5. Advertise the hub — this is the step that makes it discoverable:
# - uncomment the two feed blocks in public/_headers;
# - uncomment the `atom:link rel="hub"` line in src/pages/rss.xml.ts and
# in src/pages/changelog/rss.xml.ts;
# - add a "hub" entry to public/.well-known/api-catalog pointing at
# https://specification.website/websub.
#
# 6. Add the worked-example callout to
# src/content/spec/foundations/websub.md — the site is now an example of
# the page, and CLAUDE.md requires the page to say so.
#
# 7. Verify against production: `curl -sI https://specification.website/rss.xml
# | grep -i '^link'` shows rel="hub", and the manual `workflow_dispatch` run
# of websub-ping returns 202.
# ---------------------------------------------------------------------------
#
[[d1_databases]]
binding = "WEBSUB_DB"
database_name = "specification-website-websub"
database_id = "9b78fdb2-2eb5-421a-92d4-beedf83fb4fc"