The best way to control Claude Code, Codex and more from any computer or phone

main
md 38 lines 1.4 KB
Rendered Raw
1 # Cloudflare Website: Vocs
2
3 Deploys a [Vocs](https://vocs.dev) documentation site to Cloudflare Workers
4 with `Cloudflare.Website.Vocs`—no Vocs adapter or Wrangler configuration.
5
6 The resource runs Vocs' Waku/RSC build, deploys the server runtime as a Worker,
7 and publishes prerendered pages, generated files such as `llms.txt`, and the
8 contents of `public/` as static assets.
9
10 ```ts
11 const site = yield* Cloudflare.Website.Vocs("VocsDocs");
12 ```
13
14 ## Commands
15
16 ```sh
17 bun run dev # start Vocs' development server in workerd
18 bun run deploy # build and deploy the documentation site
19 bun run destroy # tear down the Worker and assets
20 ```
21
22 ## Project structure
23
24 - `vocs.config.ts` is loaded natively by Vocs.
25 - `src/pages/*.mdx` contains the documentation pages.
26 - `src/components/Counter.tsx` demonstrates an interactive client component.
27 - `public/hello.txt` demonstrates static passthrough assets.
28 - `alchemy.run.ts` declares the `Cloudflare.Website.Vocs` resource.
29
30 ## Notes
31
32 - `@alchemy.run/frontend-frameworks` must be installed in the project; the
33 source provider is loaded from its `/vocs` exports at deploy time.
34 - Node.js compatibility is enabled by the Worker's compatibility date.
35 - Project inputs are content-hashed, respecting `.gitignore` by default, so
36 unchanged projects skip the build and deployment.
37 - When `vocs.config.ts` uses a custom `outDir`, pass the same value as the
38 resource's `outDir` property.