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:
root committed 2026-11-04 11:44:01 -05:00
1 parent 2835f618aa
commit dd796acbae
15 files changed
+643 -212

No files matched your search

+1
View File
@@ -1 +1,2 @@
.blume-verify/
.wrangler/
+14 -8
View File
@@ -1,4 +1,5 @@
import { defineConfig } from "blume";
import { cloudflare } from "blume/deploy";
import type { StandardSchema } from "blume/core/standard-schema.ts";
import { filesystem } from "blume/sources";
import { APPENDIX } from "./appendix";
@@ -6,7 +7,7 @@ import { RECENCY, type Company } from "./companies";
import redirects from "./redirects";
// Blume's defaults (`inter`, `ibm-plex-mono`) are fetched from fonts.gstatic.com
// on every build, which has timed out on the Pages runner and, fully offline,
// on every build, which has timed out on the CI runner and, fully offline,
// silently ships no fonts at all. The same two families from Fontsource, as
// local files, keep the build network-free. Blume resolves `src` from this
// directory; the workspace links these packages under ./node_modules.
@@ -92,9 +93,14 @@ export default defineConfig({
title: "prdlk",
description: "Documentation for my LeetCode solutions",
logo: "./public/logo.svg",
deployment: {
site: "https://lc.prd.lk",
},
// A Cloudflare Workers server build (`@astrojs/cloudflare`), deployed by
// `wrangler deploy` with apps/docs/wrangler.jsonc (Worker name, the
// prdcs.wiki custom domain). Every page still prerenders; the Worker adds
// real HTTP redirects and `Accept: text/markdown` negotiation. Workers
// exposes no site URL to detect, so `site` is required.
deployment: cloudflare({
site: "https://prdcs.wiki",
}),
github: {
owner: "prdlk",
repo: "leetcode",
@@ -127,10 +133,10 @@ export default defineConfig({
structuredData: true,
x: { handle: "@prdlk" },
},
// Blume's own assistant route is server-rendered (it reads the provider key
// per request), which a static Pages build cannot ship. The SRS Worker
// answers instead (apps/api/src/ask.ts: OpenRouter, grounded on this site's
// llms-full.txt, which `agents.llmsTxt` publishes).
// Blume's own assistant route reads a provider key per request; the SRS
// Worker already holds that key and answers instead (apps/api/src/ask.ts:
// OpenRouter, grounded on this site's llms-full.txt, which `agents.llmsTxt`
// publishes), so this Worker carries no secrets.
ai: {
assistant: {
enabled: true,
+4 -1
View File
@@ -5,6 +5,7 @@
"scripts": {
"dev": "blume dev",
"build": "blume build",
"deploy": "wrangler deploy",
"doctor": "blume doctor"
},
"dependencies": {
@@ -19,10 +20,12 @@
"tailwind-merge": "^3.7.0"
},
"devDependencies": {
"@astrojs/cloudflare": "^14.4.4",
"@fontsource-variable/inter": "^5.3.0",
"@fontsource/ibm-plex-mono": "^5.3.0",
"@types/d3-hierarchy": "^3.1.7",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0"
"@types/react-dom": "^19.3.0",
"wrangler": "^4.125.0"
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
// Generated by `bun run sync` (apps/cli/sync.ts) — do not edit.
// `/leetcode/<num>` → that problem's page; exact paths, base added by Blume.
// `/<num>` → that problem's page; exact paths, base added by Blume.
export default [
{ from: "/1", to: "/hash-table/two-sum" },
{ from: "/2", to: "/hybrid-structures/add-two-numbers" },
+22
View File
@@ -0,0 +1,22 @@
// Docs Worker — the Blume site, built by `blume build` with the `cloudflare()`
// deploy adapter (blume.config.ts) and shipped by `wrangler deploy` from this
// directory. Blume's build merges this file into dist/server/wrangler.json
// (main, assets, the text/markdown negotiation wrapper) and writes the
// .wrangler/deploy/ redirect wrangler follows, so only what Blume cannot
// know lives here: the Worker's name and its domain.
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "prdcs-wiki",
"compatibility_date": "2026-08-24",
"observability": { "enabled": true },
// prdcs.wiki is a zone on the same Cloudflare account; `custom_domain`
// makes wrangler create the DNS record and certificate on deploy.
"routes": [{ "pattern": "prdcs.wiki", "custom_domain": true }],
"workers_dev": false,
// Blume writes every page as <route>/index.html and links it without the
// slash; Cloudflare's default would answer `/x` with a 307 to `/x/` on any
// path the static layer serves ahead of the Worker.
"assets": { "html_handling": "drop-trailing-slash" }
}