1# Cloudflare Website: Vocs
2
3Deploys a [Vocs](https://vocs.dev) documentation site to Cloudflare Workers
4with `Cloudflare.Website.Vocs`—no Vocs adapter or Wrangler configuration.
5
6The resource runs Vocs' Waku/RSC build, deploys the server runtime as a Worker,
7and publishes prerendered pages, generated files such as `llms.txt`, and the
8contents of `public/` as static assets.
9
10```ts
11const site = yield* Cloudflare.Website.Vocs("VocsDocs");
12```
13
14## Commands
15
16```sh
17bun run dev # start Vocs' development server in workerd
18bun run deploy # build and deploy the documentation site
19bun 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.