Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions apps/docs/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
},
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
15 changes: 9 additions & 6 deletions docs/adr/0003-migrate-docs-to-nimbus.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -37,8 +37,8 @@ requirement, not an add-on.

### Constraints

- Keep every live URL: `/` (200), `/en`, `/ko`, `/en/<slug>`, `/ko/<slug>`,
and `/llms.txt`.
- Keep every live URL: `/` (sends readers to `/en`), `/en`, `/ko`,
`/en/<slug>`, `/ko/<slug>`, 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.
Expand Down Expand Up @@ -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/<locale>/`, so the locale is the first segment of every
URL. `sidebar.scope: 'section'` limits the rail (and prev/next) to the
Expand Down Expand Up @@ -169,7 +171,8 @@ Nitro upgrade risks breaking the build or the i18n routes again.

- Page URLs are unchanged. Docus's `/raw/<locale>/<page>.md` Markdown paths
are replaced by Nimbus's `/<locale>/<page>/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.
Expand Down
Loading