mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-09 20:01:15 +02:00
1.4 KiB
1.4 KiB
Cloudflare Website: Vocs
Deploys a Vocs documentation site to Cloudflare Workers
with Cloudflare.Website.Vocs—no Vocs adapter or Wrangler configuration.
The resource runs Vocs' Waku/RSC build, deploys the server runtime as a Worker,
and publishes prerendered pages, generated files such as llms.txt, and the
contents of public/ as static assets.
const site = yield* Cloudflare.Website.Vocs("VocsDocs");
Commands
bun run dev # start Vocs' development server in workerd
bun run deploy # build and deploy the documentation site
bun run destroy # tear down the Worker and assets
Project structure
vocs.config.tsis loaded natively by Vocs.src/pages/*.mdxcontains the documentation pages.src/components/Counter.tsxdemonstrates an interactive client component.public/hello.txtdemonstrates static passthrough assets.alchemy.run.tsdeclares theCloudflare.Website.Vocsresource.
Notes
@alchemy.run/frontend-frameworksmust be installed in the project; the source provider is loaded from its/vocsexports at deploy time.- Node.js compatibility is enabled by the Worker's compatibility date.
- Project inputs are content-hashed, respecting
.gitignoreby default, so unchanged projects skip the build and deployment. - When
vocs.config.tsuses a customoutDir, pass the same value as the resource'soutDirproperty.