opencode/services/site
Adam 2bbd78a5ba
ci(site): build the docs in both modes
dev.opencode.ai renders the docs restyle and opencode.ai the legacy docs
until the flip (src/docs/AGENTS.md, "Restyle"), so check-docs builds
both modes.
2026-11-06 15:14:37 -06:00
..
perf perf(site): cut forced style recalcs on load (#62421) 2026-11-06 20:33:10 +00:00
public feat(site): serve the V2 docs at /docs (#62389) 2026-11-06 17:57:04 +00:00
script feat(site): move browse to /product/browse and merge more products (#62427) 2026-11-06 16:08:01 -05:00
src ci(site): build the docs in both modes 2026-11-06 15:14:37 -06:00
test feat(site): restyle the docs in the site's shell on dev.opencode.ai (#62425) 2026-11-06 21:09:37 +00:00
textjs chore(site): update Text.js to 1.6.1 and drop the DevTools focus workaround (#62353) 2026-11-06 14:09:24 +00:00
.gitignore feat(site): serve the V2 docs at /docs (#62389) 2026-11-06 17:57:04 +00:00
AGENTS.md feat(site): restyle the docs in the site's shell on dev.opencode.ai (#62425) 2026-11-06 21:09:37 +00:00
cloudflare.config.ts feat(site): serve the V2 docs at /docs (#62389) 2026-11-06 17:57:04 +00:00
DESIGN.md fix(site): open menus where they fit and stop resetting scroll on reload (#62396) 2026-11-06 18:04:47 +00:00
media-manifest.txt feat(site): deploy the opencode.ai site separately from the docs (#62209) 2026-11-05 17:53:39 -05:00
MEDIA.md feat(site): deploy the opencode.ai site separately from the docs (#62209) 2026-11-05 17:53:39 -05:00
package.json perf(site): cut forced style recalcs on load (#62421) 2026-11-06 20:33:10 +00:00
README.md feat(site): serve the V2 docs at /docs (#62389) 2026-11-06 17:57:04 +00:00
strobe.json perf(site): cut forced style recalcs on load (#62421) 2026-11-06 20:33:10 +00:00
tsconfig.json feat(site): deploy the opencode.ai site separately from the docs (#62209) 2026-11-05 17:53:39 -05:00
vite.config.ts refactor(site): prepare the shared docs components for the docs restyle (#62424) 2026-11-06 20:54:40 +00:00

SolidStart

Everything you need to build a Solid project, powered by solid-start;

Creating a project

# create a new project in the current directory
npm init solid@latest

# create a new project in my-app
npm init solid@latest my-app

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

GitHub API

The Worker holds no GitHub token. Stars, contributors and avatars come from the build-time snapshot (script/github-snapshot.ts, src/lib/github-snapshot.json). The changelog reads releases from the GitHub API without a token (src/lib/changelog.ts, src/lib/github-api.ts), cached for 15 minutes in memory and at the edge, with the snapshot as fallback. Without a token GitHub allows 60 calls an hour per IP; in dev the last good releases are kept in $TMPDIR/opencode-site-github/, so a restart while rate limited still has them. The snapshot script uses GITHUB_TOKEN when it is set (CI passes the workflow's own token):

GITHUB_TOKEN=$(gh auth token) bun ./script/github-snapshot.ts

Never commit a token.

Building and deploying

bun run build -- --mode dev builds the site (Nitro's cloudflare-module preset) into the Build Output Specification tree in .cloudflare/output; bun run deploy:dev builds and runs cf deploy --prebuilt --mode dev. cloudflare.config.ts defines the Worker (opencode-site-dev on dev.opencode.ai, opencode-site-production on opencode.ai), its bindings and its routes. CI deploys on pushes to dev and production (.github/workflows/deploy-site.yml). Production takes no routes until productionOwnsRoot is switched on.

The V2 docs at /docs are part of this app (src/docs/, see src/docs/AGENTS.md). script/build.ts prerenders them into the Worker's assets after vite build. A /docs URL without a V2 page redirects to the V1 docs app on docs.opencode.ai.

This project was created with the Solid CLI