Skip to content

MC1: the blog on Workers - #2

Merged
pullely merged 1 commit into
mainfrom
orun/MC-2-the-blog-on-workers
Nov 12, 2026
Merged

pullely merged 1 commit into
mainfrom
orun/MC-2-the-blog-on-workers

Conversation

@pullely

@pullely pullely commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

microcmsio/simple-blog-with-microcms (4077da9, the template behind Vercel's Next.js Blog with microCMS) in apps/web as one Cloudflare Worker with Static Assets (cloudflare-workers-assets-turbo). The template's tree is kept — app/ (home, /p/[current], /blogs/[slug], /tags/[tagId] and its pages, /search and its pages, not-found), components/, constants/, libs/, public/, microcms-template.json, its ESLint and TypeScript configuration and its MIT LICENSE. Next ^16.4.1 → 16.4.5 on @opennextjs/cloudflare 1.20.16, both pinned (1.20.16's floor on the 16 line): output standalone traced from the workspace root, images unoptimized, BASE_URL inlined per environment, the static-assets incremental cache, and wrangler.jsonc with nodejs_compat and Workers Observability. libs/microcms.ts reads MICROCMS_SERVICE_DOMAIN and MICROCMS_API_KEY per request from the Worker (getCloudflareContext().env; process.env without a context) and creates the SDK client per request — upstream threw at module load without them; while either is missing every read is answered by libs/sample.ts (three posts, two tags and a writer in the template's API shapes) under a 'not connected' notice (components/ConnectMicroCMS). The layout is force-dynamic. proxy.ts is removed: its rule (a draft, ?dk=, never cached) is a second headers() entry after the template's CDN-Cache-Control one — OpenNext runs a Node proxy only experimentally and appended its header. One seam, app/site.ts: the title template, the Open Graph title, the logo's alt text and the footer read SITE_NAME. An article's canonical URL is /blogs/ (upstream: /articles/, which does not exist). apps/web/component.yaml unsets the microCMS secrets for the build and pushes them to the Worker after it (tooling/wire/worker-secrets.mjs; a verify lane holds no Cloudflare credential and pushes nothing); the smoke reads the home page and a missing article's 404. tests/web (vitest): the reads and their sample fallback (the Worker's env over the process, a key changed between reads), the highlighting, the template's components, the cache headers and the sample content against microcms-template.json. The Worker is 1.9 MiB gzipped (Workers Free). typecheck, lint, test and build are green; wrangler dev answers every route with the sample posts, and — behind a test-only entry that sends *.microcms.io to a local stand-in — the service's posts, an article with its writer, a draft and a tag.

🤖 Generated with Claude Code

microcmsio/simple-blog-with-microcms (4077da9, the template behind Vercel's Next.js Blog with microCMS) in apps/web as one Cloudflare Worker with Static Assets (cloudflare-workers-assets-turbo). The template's tree is kept — app/ (home, /p/[current], /blogs/[slug], /tags/[tagId] and its pages, /search and its pages, not-found), components/, constants/, libs/, public/, microcms-template.json, its ESLint and TypeScript configuration and its MIT LICENSE. Next ^16.4.1 → 16.4.5 on @opennextjs/cloudflare 1.20.16, both pinned (1.20.16's floor on the 16 line): output standalone traced from the workspace root, images unoptimized, BASE_URL inlined per environment, the static-assets incremental cache, and wrangler.jsonc with nodejs_compat and Workers Observability. libs/microcms.ts reads MICROCMS_SERVICE_DOMAIN and MICROCMS_API_KEY per request from the Worker (getCloudflareContext().env; process.env without a context) and creates the SDK client per request — upstream threw at module load without them; while either is missing every read is answered by libs/sample.ts (three posts, two tags and a writer in the template's API shapes) under a 'not connected' notice (components/ConnectMicroCMS). The layout is force-dynamic. proxy.ts is removed: its rule (a draft, ?dk=, never cached) is a second headers() entry after the template's CDN-Cache-Control one — OpenNext runs a Node proxy only experimentally and appended its header. One seam, app/site.ts: the title template, the Open Graph title, the logo's alt text and the footer read SITE_NAME. An article's canonical URL is /blogs/<id> (upstream: /articles/<id>, which does not exist). apps/web/component.yaml unsets the microCMS secrets for the build and pushes them to the Worker after it (tooling/wire/worker-secrets.mjs; a verify lane holds no Cloudflare credential and pushes nothing); the smoke reads the home page and a missing article's 404. tests/web (vitest): the reads and their sample fallback (the Worker's env over the process, a key changed between reads), the highlighting, the template's components, the cache headers and the sample content against microcms-template.json. The Worker is 1.9 MiB gzipped (Workers Free). typecheck, lint, test and build are green; wrangler dev answers every route with the sample posts, and — behind a test-only entry that sends *.microcms.io to a local stand-in — the service's posts, an article with its writer, a draft and a tag.

Co-Authored-By: Claude <noreply@anthropic.com>
Orun-Task: MC-2
@pullely
pullely merged commit d290650 into main Nov 12, 2026
2 checks passed
@pullely
pullely deleted the orun/MC-2-the-blog-on-workers branch November 12, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants