Repository navigation
feat(docs): migrate documentation site from Docus to Nimbus - #43
Conversation
Move the docs site from docs/ (Docus on Nuxt) to apps/docs/, a Nimbus
(Astro 7) static site deployed to the existing Cloudflare Pages project.
- Migrate all 20 en/ko pages from MDC to MDX with Nimbus components
- Wire Astro i18n routing by hand: prefixed /en and /ko URLs, / redirects
to /en, language switcher, hreflang alternates, per-locale sidebar/search
- Keep file-style URLs (build.format: file) so every live URL still works
- Drop the D1 binding, nodejs_compat and NUXT_* vars from wrangler.jsonc
- Lint Astro sources via pleaseai({ astro: true }); ignore vendored UI
- Add ADR-0003 superseding ADR-0001 and ADR-0002; update CLAUDE.md
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Compatibility | 7 minor |
| ErrorProne | 12 medium 26 high |
| Security | 3 critical 19 high |
🟢 Metrics 454 complexity · 0 duplication
Metric Results Complexity 454 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Code Review
This pull request migrates the documentation site from Docus (Nuxt) to Nimbus (Astro 7 + Tailwind v4) in apps/docs/, transitioning it to a fully static build deployed on Cloudflare Pages. It introduces a comprehensive set of UI components, configures Astro's built-in i18n routing for English and Korean locales, and updates the MDX content to use the new components. Feedback on the changes highlights a high-severity security concern regarding custom regex-based HTML sanitization in the Banner component, advising the use of a standard library like DOMPurify. Additionally, several medium-severity localization improvements are requested to avoid hardcoded English strings in the Aside, Pagination, and SearchDialog components by leveraging the locale utilities.
There was a problem hiding this comment.
All reported issues were addressed across 152 files
Architecture diagram
sequenceDiagram
participant Dev as Developer
participant Turbo as Turborepo (Root)
participant Docs as Nimbus Docs (apps/docs)
participant Astro as Astro 7 Build
participant Pages as Cloudflare Pages
participant CDN as Edge/CDN
participant Browser as User Browser
participant Agent as AI Agents
Note over Dev,Pages: Build Time Flow
Dev->>Turbo: bun run build (workspaces: packages/*, apps/*)
Turbo->>Docs: Trigger astro build (output: static)
Note over Docs: Source: src/content/docs/{en,ko}/*.mdx
Docs->>Astro: Process MDX via Nimbus (Sätteri)
Astro->>Astro: Apply i18n routing (/en, /ko prefixes)
Astro->>Astro: Generate file-style URLs (en/cli.html)
Astro->>Astro: Build Pagefind search index (per-locale)
Astro->>Astro: Generate llms.txt, llms-full.txt, per-page .md/.mdx
Note over Astro: Sidebar scoped per locale (scope: 'section')
Astro-->>Docs: dist/ output
Docs->>Pages: wrangler pages deploy (project: pleaseai-code-style)
Note over Pages,CDN: Runtime Request Flow
Browser->>CDN: GET / (no locale prefix)
CDN->>Pages: Serve meta-refresh to /en
Pages-->>Browser: 302/meta-refresh to /en
Browser->>CDN: GET /en/cli
CDN->>Pages: Serve en/cli.html (200)
alt Locale-specific page
Browser->>CDN: GET /ko/cli
CDN->>Pages: Serve ko/cli.html (200)
end
alt Sitemap request
Browser->>CDN: GET /sitemap.xml
CDN->>Pages: _redirects rule (301 to /sitemap-index.xml)
end
Browser->>CDN: GET /llms.txt
CDN-->>Browser: Plain text index for AI consumption
Note over Browser: Client-side interactivity (after hydration)
Browser->>Browser: Language switcher (full reload, data-astro-reload)
Browser->>Browser: Pagefind search (per-<html lang> index)
Browser->>Browser: Theme toggle (localStorage: ui-mode)
Browser->>Browser: Sidebar filter/persistence (sessionStorage)
Agent->>CDN: GET /llms.txt (AI discovery)
Agent->>CDN: GET /en/cli/index.md (per-page markdown)
CDN-->>Agent: Markdown content for AI consumption
Note over CDN: Static hosting only - no D1, no nodejs_compat, no server runtime
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
- Localize Aside labels, pagination and search dialog strings through the shared ui table in src/i18n/locales.ts - Point docs pages at their locale's llms.txt index - Normalize the current slug with toPagePath in [...slug].astro - Fix Nimbus CLI invocation and locale guidance in CLAUDE.md and AGENT.md - Reference superseded ADR files and add a date to ADR-0003
Deploying code-style with
|
| Latest commit: |
a464514
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ea12c888.code-style.pages.dev |
| Branch Preview URL: | https://feat-docs-nimbus.code-style.pages.dev |
|
/gemini review |
There was a problem hiding this comment.
All reported issues were addressed across 12 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
Code Review
This pull request migrates the documentation site from Docus (Nuxt) to Nimbus (Astro), restructuring the documentation infrastructure into the apps/docs/ directory and removing the legacy docs/ directory. The reviewer identified a high-severity security vulnerability in the new Banner.astro component regarding insecure regex-based HTML sanitization, recommending the use of a robust sanitization library or refactoring to use slots to prevent potential Cross-Site Scripting (XSS) attacks.
# Conflicts: # CLAUDE.md # bun.lock # docs/package.json # package.json
|



Summary
Moves the docs site from
docs/(Docus/Nuxt) toapps/docs/(Cloudflare Nimbus on Astro 7, static output). It deploys to the existing Cloudflare Pages projectpleaseai-code-style. The rationale and trade-offs are indocs/adr/0003-migrate-docs-to-nimbus.md, which supersedes ADR-0001 and ADR-0002.Changes
/enand/ko,/redirects to/en, language switcher, hreflang, per-locale sidebar and Pagefind search.build.format: 'file',trailingSlash: 'never'), so every existing URL is preserved.nodejs_compat, and the NUXT vars fromwrangler.jsonc.@cloudflare/nimbus-docs0.17.0 andastro7.3.1.packages/*andapps/*; thedocs:*scripts now point atapps/docs.astro: true, ignoring the vendoredcomponents/ui/**andDocsLayout.astro./llms.txt,/llms-full.txt,/{en,ko}/llms.txt, and per-page.md/.mdx./sitemap.xmlto/sitemap-index.xml.Verification
bun run build,bun run lint, andbun run testpass (237 CLI tests, 3 ast-grep-config tests).astro checkreports 0 errors, andlint:docsreports 20 files clean.astro previewreturns 200 for/,/en,/ko,/en/cli,/ko/cli,/en/eslint-config, and/llms.txt./clistays 404, as it does today.Deployment action required (maintainer)
In the Cloudflare Pages dashboard, set the root directory to
apps/docs, the build command tobun run build, and the output directory todist. Optionally delete the now-unused D1 databasepleaseai-code-style-db. The Cloudflare Pages check on this PR may fail until the build settings are updated.Known follow-ups
/raw/<locale>/*.mdpaths now return 404. The new path is/<locale>/<page>/index.md..mdxfiles are covered bylint:docs, not root ESLint.Related issue
None.
Checklist
bun run build)bun run lint)BREAKING CHANGE:note is includedSummary by cubic
Migrates the documentation site from
docs/(Docus/Nuxt) toapps/docs/(Nimbus on Astro 7, static output) while preserving every existing URL. The site deploys to the existing Cloudflare Pages projectpleaseai-code-style, and ADR-0003 supersedes ADR-0001 and ADR-0002.Changes
/enand/koprefixes,/redirects to/en, language switcher, hreflang, per-locale sidebar and Pagefind search./sitemap.xmlnow redirects to/sitemap-index.xml.nodejs_compat, and NUXT vars fromwrangler.jsoncand pinned Nimbus dependencies exactly./llms.txt,/llms-full.txt, per-localellms.txt, per-page.md/.mdx) and enabled ESLint for Astro sources.uitable; remaining Nimbus chrome stays English on Korean pages, and old/raw/<locale>/*.mdpaths now return 404.Deployment
apps/docs, the build command tobun run build, and the output directory todist.Written for commit a464514. Summary will update on new commits.