From c7cce4bb04c3ea76a6a8c99997f8e97fc78c2f9f Mon Sep 17 00:00:00 2001 From: Minsu Lee Date: Tue, 13 Oct 2026 10:48:19 +0900 Subject: [PATCH 1/2] docs: correct Cloudflare Pages project name and root redirect The docs site deploys to the Pages project `code-style`, not `pleaseai-code-style`. Fix the name in AGENTS.md, ADR-0003, and apps/docs/wrangler.jsonc so `bun run docs:deploy` targets the real project. ADR-0003 described `/` as a meta-refresh page. Nimbus writes Astro's `redirects` into `dist/_redirects`, so Cloudflare Pages answers `/` with a 301 to `/en`. Update the ADR to match. --- AGENTS.md | 2 +- apps/docs/wrangler.jsonc | 2 +- docs/adr/0003-migrate-docs-to-nimbus.md | 15 +++++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 4744de4..bdd8d75 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -51,7 +51,7 @@ Monorepo providing shared code style configurations for PleaseAI projects. ## Docs Site -- Located at `apps/docs/` (`@pleaseai/code-style-docs`) — [Nimbus](https://github.com/cloudflare/nimbus) (Astro 7 + Tailwind v4), static output deployed to the Cloudflare Pages project `pleaseai-code-style` +- Located at `apps/docs/` (`@pleaseai/code-style-docs`) — [Nimbus](https://github.com/cloudflare/nimbus) (Astro 7 + Tailwind v4), static output deployed to the Cloudflare Pages project `code-style` - Bun workspace member (`apps/*`); `bun run build` (turbo) builds it to `apps/docs/dist/` - Dev / build / deploy: `bun run docs:dev`, `bun run docs:build`, `bun run docs:deploy` (`wrangler pages deploy`) - Checks inside `apps/docs`: `bun run typecheck` (`astro check`), `bun run lint:docs` (Nimbus prose/MDX lint) diff --git a/apps/docs/wrangler.jsonc b/apps/docs/wrangler.jsonc index bea2905..ea4fdd7 100644 --- a/apps/docs/wrangler.jsonc +++ b/apps/docs/wrangler.jsonc @@ -2,7 +2,7 @@ "$schema": "node_modules/wrangler/config-schema.json", // Existing Cloudflare Pages project. The site is fully static, so no // bindings, compatibility flags, or vars are needed. - "name": "pleaseai-code-style", + "name": "code-style", "pages_build_output_dir": "dist", "compatibility_date": "2026-10-12" } diff --git a/docs/adr/0003-migrate-docs-to-nimbus.md b/docs/adr/0003-migrate-docs-to-nimbus.md index 30bd91b..f5c8450 100644 --- a/docs/adr/0003-migrate-docs-to-nimbus.md +++ b/docs/adr/0003-migrate-docs-to-nimbus.md @@ -15,7 +15,7 @@ ADR-0002 (0002-workaround-docus-i18n-routing-bug.md). The documentation site (`https://code-style.pages.dev`) ran on **Docus** (Nuxt 4 + Nuxt Content) from `docs/`, deployed to the Cloudflare Pages project -`pleaseai-code-style`. Keeping it working required a stack of workarounds: +`code-style`. Keeping it working required a stack of workarounds: - **Bun linker** — Docus ships raw `.ts` server files that Nitro's `rollup-plugin-inject` cannot parse under Bun's isolated linker, so the root @@ -37,8 +37,8 @@ requirement, not an add-on. ### Constraints -- Keep every live URL: `/` (200), `/en`, `/ko`, `/en/`, `/ko/`, - and `/llms.txt`. +- Keep every live URL: `/` (sends readers to `/en`), `/en`, `/ko`, + `/en/`, `/ko/`, and `/llms.txt`. - Keep the existing Cloudflare Pages project and its domain. - Bun workspace, ESM only, lint with the repository's own ESLint config. - English and Korean content, with the same pages in both locales. @@ -71,8 +71,10 @@ the owned source instead of adopting a third-party plugin: - `astro.config.ts` declares `i18n` with `locales: ['en', 'ko']`, `defaultLocale: 'en'`, and `prefixDefaultLocale: true`, so every locale is - prefixed. `redirects: { '/': '/en' }` makes `/` a meta-refresh page to the - English landing, as before. + prefixed. `redirects: { '/': '/en' }` sends `/` to the English landing. + Nimbus writes the rule into `dist/_redirects`, so Cloudflare Pages answers + `/` with a 301 to `/en`. Astro's meta-refresh `index.html` is still emitted + but is never served. - Content lives in one Nimbus `docs` collection under `src/content/docs//`, so the locale is the first segment of every URL. `sidebar.scope: 'section'` limits the rail (and prev/next) to the @@ -169,7 +171,8 @@ Nitro upgrade risks breaking the build or the i18n routes again. - Page URLs are unchanged. Docus's `/raw//.md` Markdown paths are replaced by Nimbus's `///index.md`; `/sitemap.xml` - redirects to `/sitemap-index.xml`. + redirects to `/sitemap-index.xml`. `/` answered 200 on the Docus site and + now answers a 301 to `/en`. - `bunfig.toml` keeps `linker = "hoisted"`. It was introduced for Docus and may no longer be needed, but removing it changes how every workspace package resolves dependencies and has not been verified. From 1ac4d77d1c40bc8d55ae4f339d622ff7d6f39e94 Mon Sep 17 00:00:00 2001 From: Minsu Lee Date: Tue, 13 Oct 2026 12:07:30 +0900 Subject: [PATCH 2/2] docs: correct root redirect comment in astro.config.ts --- apps/docs/astro.config.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/docs/astro.config.ts b/apps/docs/astro.config.ts index d12169f..3f0f5ca 100644 --- a/apps/docs/astro.config.ts +++ b/apps/docs/astro.config.ts @@ -55,8 +55,9 @@ export default defineConfig({ }, }, // `/` has no content of its own: send readers to the default locale's - // landing page. Static output emits this as a meta-refresh page, like the - // previous site did. + // landing page. Nimbus writes this into `dist/_redirects`, so Cloudflare + // Pages answers `/` with a 301; Astro's meta-refresh `index.html` is never + // served. redirects: { '/': `/${defaultLocale}`, },