mirror of
https://github.com/prdlk/leetcode.git
synced 2026-11-04 21:47:38 +00:00
feat(docs): move the site to prdcs.wiki on a Cloudflare Worker
Blume's cloudflare() adapter builds the docs as the prdcs-wiki Worker (apps/docs/wrangler.jsonc: name, prdcs.wiki custom domain), and deploy.yml ships it with wrangler instead of GitHub Pages. The SRS Worker's DOCS_URL / DOCS_ORIGIN, release links and README badge follow the new domain.
This commit is contained in:
1 parent
2835f618aa
commit
dd796acbae
15 files changed
+643
-212
No files matched your search
+3
-3
@@ -1,9 +1,9 @@
|
||||
/**
|
||||
* POST /ask — the docs assistant's backend.
|
||||
*
|
||||
* The docs are a static GitHub Pages site, and Blume's own assistant route is
|
||||
* server-rendered (it reads the provider key per request), so the site points
|
||||
* `ai.assistant.endpoint` here instead. This speaks the Blume island's wire
|
||||
* Blume's own assistant route reads the provider key per request, and the
|
||||
* docs Worker (apps/docs, `cloudflare()` build) holds no secrets, so the site
|
||||
* points `ai.assistant.endpoint` here instead. This speaks the Blume island's wire
|
||||
* contract (`blume/components/islands/hooks.ts`):
|
||||
*
|
||||
* - request: `{ messages: [{ role, content }], page: { path } }` as JSON,
|
||||
|
||||
@@ -324,7 +324,7 @@ export default {
|
||||
if (path.startsWith("/admin/") && request.method === "POST") {
|
||||
return await handleAdmin(request, env, path);
|
||||
}
|
||||
// The docs assistant (the static Pages site's `ai.assistant.endpoint`).
|
||||
// The docs assistant (the docs site's `ai.assistant.endpoint`).
|
||||
if (path === "/ask") return await handleAsk(request, env);
|
||||
|
||||
if (path === "/chart/progress.svg") {
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
"REPO": "prdlk/leetcode",
|
||||
"FROM_EMAIL": "srs@prdlk.com",
|
||||
"TO_EMAIL": "prnk28@gmail.com",
|
||||
"DOCS_URL": "https://lc.prd.lk",
|
||||
"DOCS_ORIGIN": "https://lc.prd.lk,https://prdlk.github.io",
|
||||
"DOCS_URL": "https://prdcs.wiki",
|
||||
"DOCS_ORIGIN": "https://prdcs.wiki",
|
||||
"PUBLIC_URL": "https://srs-api.prdlk.workers.dev",
|
||||
// The docs assistant's OpenRouter model (POST /ask). `:free` variants share
|
||||
// an upstream pool and answer 429 when it is saturated.
|
||||
|
||||
Reference in new issue
Block a user