Skip to content

docs: migrate apps/docs from Nuxt/docs-please to Cloudflare Nimbus (Astro) - #155

Merged
amondnet merged 4 commits into
mainfrom
docs/nimbus-migration
Nov 23, 2026
Merged

amondnet merged 4 commits into
mainfrom
docs/nimbus-migration

Conversation

@amondnet

@amondnet amondnet commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Nuxt + docs-please docs build was already broken on main ([@vue/compiler-sfc] Failed to resolve extends base type on NuxtLinkProps in docs-please's UButton.vue, reproduced on main's exact lockfile), and no CI workflow builds the docs. This moves apps/docs to Cloudflare Nimbus (@cloudflare/nimbus-docs 0.20.0, Astro 7.4.2).

What changed

  • apps/docs is replaced with a Nimbus scaffold (owned-source layouts and components under src/, plus the scaffold's AGENT.md, CLAUDE.md, and nimbus.json).
  • All 13 pages and the landing page are ported to src/content/docs/{getting-started,guides,configuration,reference}/. Numeric prefixes are dropped, sidebar.order comes from the old prefix, duplicate body H1s are removed, and internal links are rewritten (all 11 resolve). Prose is otherwise unchanged.
  • ::code-group blocks become <Tabs> in getting-started/installation.mdx and configuration/overview.mdx. The landing page uses LinkButton + CardGrid, and its GitHub link now points to pleaseai/code-intelligence (it pointed to chatbot-pf/code-please).
  • URLs move from /docs/<group>/<page> to /<group>/<page>/; public/_redirects (/docs/* /:splat 301) keeps old links working.
  • wrangler.jsonc stays in Cloudflare Pages format (name: code-please-docs, pages_build_output_dir: ./dist); the D1 binding is removed because the site is static.
  • Root eslint.config.js ignores apps/docs/** (the scaffold's code style produced about 2,400 style errors) and drops the Nuxt MDC override.
  • apps/docs/package.json keeps the name @pleaseai/code-please-docs-site (root build:docs filters on it), uses typescript ^6.0.3, and has Pages-flavoured preview:cf and deploy scripts.

Scope

Left untouched as stale references: specs/004-docs-site/spec.md and the ref:clone script that clones docs-please. Pre-existing doc style issues are carried over unchanged: 10 code fences without a language (mostly guides/mcp-server.md) and Title Case headings.

Blast radius

Docs site only. Before merge: if the Cloudflare Pages project's dashboard build output directory is set to the old .output/public, it must change to dist; this is not visible from the repo. src/content/partials/ is empty and untracked, so the build logs a harmless No files found warning for the partials collection.

Verification

  • bun run build:docs succeeds (14 pages, Pagefind indexed 14 pages). dist/ contains every page's index.html, llms.txt, _redirects, and pagefind/.
  • nimbus-docs check --json after build: 0 errors, 0 warnings (status partial only because .md pages are not linted by Nimbus).
  • Root bun run typecheck (8/8, astro check 0 errors), bun run lint, and bun run test pass.

Related issue

None.

Checklist

  • PR title follows Conventional Commits
  • Tests added or updated, and the suite passes (bun run test)
  • Lint/format pass (bun run lint)
  • Documentation updated if behavior changed
  • No breaking change, or a BREAKING CHANGE: note is included (old /docs/* URLs redirect with 301)

Summary by cubic

Migrates apps/docs from Nuxt + docs-please to Cloudflare Nimbus (@cloudflare/nimbus-docs 0.20.0 on Astro 7.4.2). The Nuxt build was already broken on main — @vue/compiler-sfc fails to resolve NuxtLinkProps in docs-please — and no CI workflow built the docs, so this PR delivers the first working docs build.

Changes

  • Ports all 13 pages and the landing page to src/content/docs/; prose is unchanged otherwise.
  • Moves URLs from /docs/<group>/<page> to /<group>/<page>/; a _redirects rule 301-redirects old links.
  • Converts ::code-group blocks to <Tabs> and uses LinkButton + CardGrid on the landing page, whose GitHub link now points to pleaseai/code-intelligence.
  • Replaces the Nimbus starter logo with a Code Please mark shared by the header and favicons.
  • Removes the D1 binding and docs-please dependencies since the site is static.
  • Makes root eslint.config.js ignore apps/docs/** and drops the Nuxt MDC override.
  • Applies code review fixes: light-mode focus ring contrast, sidebar fade color token, pagination key caps on touch screens, overlapping Pagefind loads, the mobile TOC fallback, and the coordinates manifest cache policy on Pages.
  • Stops superseded Pagefind searches early so a replaced query skips fetching its result fragments.

Migration

  • Before deploying, the Cloudflare Pages project's build output directory must change from .output/public to dist in the dashboard (not visible from the repo).

Written for commit 00cf638. Summary will update on new commits.

Turn on auto-fix

Demo

Nimbus docs site: landing page, Introduction with sidebar groups, configuration page tabs, and the TypeScript 7 section

…stro)

- Replace the Nuxt + docs-please site with a Nimbus 0.20.0 (Astro 7) scaffold; port all 13 pages
  and the landing page (numeric prefixes dropped, sidebar.order kept, duplicate H1s removed,
  internal links rewritten).
- Code groups become Tabs in installation.mdx and configuration/overview.mdx; the landing uses
  LinkButton and CardGrid.
- URLs move from /docs/<group>/<page> to /<group>/<page>/; public/_redirects keeps old links
  working.
- wrangler.jsonc stays Cloudflare Pages format (code-please-docs, output ./dist); the D1 binding
  is gone since the site is static.
- eslint ignores apps/docs/** (scaffold code style) and drops the Nuxt MDC override.
@socket-security

socket-security Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the documentation site from Nuxt to Astro, integrating @cloudflare/nimbus-docs and configuring it for Cloudflare Pages. It introduces a comprehensive set of UI components, static assets, configuration files, and agent-friendly documentation templates. Feedback on the changes suggests refactoring the search client script to use standard Custom Events instead of expando properties on DOM elements to improve maintainability and prevent potential memory leaks.

@amondnet
amondnet marked this pull request as ready for review November 23, 2026 01:18
@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes since the previous review appear safe to merge.

Summary

Migrates the docs site from Nuxt to Astro and Cloudflare Nimbus.

  • The docs site builds as static Astro pages for Cloudflare Pages.
  • The docs pages use new paths while keeping old /docs/ links working.
  • Readers can navigate, search, and follow the current section across the docs site.
  • Docs pages can use reusable cards, tabs, callouts, code, and interactive examples.
  • The docs site publishes Markdown indexes, page metadata, and social images.
  • The docs app includes project guidance for editing and maintaining its Nimbus site.

Reviews (3) · Last reviewed commit: "chore(docs): stop superseded Pagefind se..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 issues found across 153 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/docs/src/components/ui/code/index.ts">

<violation number="1" location="apps/docs/src/components/ui/code/index.ts:1">
P3: This barrel re-exports `Code`, but nothing imports it and `src/components.ts` does not register it for MDX, so the component is unreachable. Either register it in `components.ts` or drop this file and `Code.astro` until they are needed.</violation>
</file>

<file name="apps/docs/src/components/ui/banner/banner.client.ts">

<violation number="1" location="apps/docs/src/components/ui/banner/banner.client.ts:40">
P3: Removing the focused close button drops keyboard focus to `<body>`, so keyboard users lose their place after dismissing. Move focus to `#main-content` (the existing `tabindex="-1"` main element) before removing the banner.</violation>
</file>

<file name="apps/docs/src/components/ui/pagination/pagination.client.ts">

<violation number="1" location="apps/docs/src/components/ui/pagination/pagination.client.ts:51">
P3: Moving the pointer out of the bar hides the highlight even when a link inside it still has focus. Keep the highlight on the focused half in `onLeave`, and only hide when nothing is focused.</violation>
</file>

<file name="apps/docs/src/components/ui/tabs/tabs.client.ts">

<violation number="1" location="apps/docs/src/components/ui/tabs/tabs.client.ts:55">
P3: The synthesized path overwrites an author-supplied `id` on `<TabItem>`, while the manual path keeps it with `||=`. Reuse `panel.id` when present so `#id` anchors on TabItem keep working.</violation>
</file>

<file name="apps/docs/src/lib/variants.ts">

<violation number="1" location="apps/docs/src/lib/variants.ts:28">
P3: An unknown variant value falls back to the default for the classes, but compound matching still uses the raw value. A `size="xl"` with `shape="square"` therefore drops the square's `size-*` classes and the button collapses. Resolve each selection to a known value once, and use that value for both the class lookup and the compound filter.</violation>
</file>
Architecture diagram
sequenceDiagram
    participant Dev as Developer
    participant CLI as Nimbus CLI
    participant Build as Astro Build
    participant Vite as Vite Plugin
    participant Content as Content Collections
    participant MDX as MDX Processor
    participant CF as Cloudflare Pages
    participant CDN as Edge CDN
    participant Browser as Browser
    participant Search as Pagefind
    participant DB as D1 Database

    Note over Dev,DB: Documentation Site Architecture (Astro + Nimbus)
    
    Dev->>CLI: npx nimbus-docs check
    CLI->>Content: Validate frontmatter & links
    Content-->>CLI: Validation results
    CLI-->>Dev: 0 errors, 0 warnings

    Dev->>Build: astro build
    Build->>Vite: Load config & plugins
    Vite->>Content: Read content collections
    Content-->>Vite: MDX files (docs, partials)
    Vite->>MDX: Transform MDX
    MDX-->>Vite: Compiled pages
    Vite->>Search: Index pages
    Search-->>Vite: Pagefind index
    Vite-->>Build: Static HTML files
    Build-->>CF: Deploy to ./dist

    Browser->>CDN: GET /docs/getting-started
    CDN->>CDN: 301 redirect logic
    CDN-->>Browser: 301 /getting-started/
    
    Browser->>CDN: GET /getting-started/
    CDN-->>Browser: Static HTML page
    
    Browser->>Browser: Load client-side JS
    
    alt User searches
        Browser->>Search: Pagefind query
        Search-->>Browser: Results
    end

    Note over Browser,DB: Runtime interactions (client-side)
    Browser->>CDN: GET /llms.txt
    CDN-->>Browser: Markdown index
    
    Note over CF: No D1 binding (static site)
    Note over CDN: Cache-Control for hashed assets

    opt Internal links
        Browser->>CDN: Navigate to page
        CDN-->>Browser: Rendered page
        Browser->>Search: Update Pagefind
    end
Loading

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/docs/src/styles/prose.css Resolved
Comment thread apps/docs/src/styles/globals.css Resolved
Comment thread apps/docs/AGENT.md Resolved
Comment thread apps/docs/src/lib/variants.ts Resolved
Comment thread apps/docs/AGENT.md Resolved
Fix the cubic findings that affect this site: light-mode focus ring
contrast, the sidebar fade's missing color token, the pagination key cap
on touch screens, overlapping Pagefind loads, the mobile TOC fallback,
the coordinates manifest cache policy on Pages, and two AGENT.md rules
(a scoped rollback and the Pages audit check).
@amondnet

amondnet commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the documentation site to the Nimbus framework, introducing new UI components, updated build configurations, and improved project structure. The review feedback provides actionable improvements, including optimizing TOC rail measurements to avoid layout thrashing, ensuring Pagefind search respects AbortSignals, fixing potential FOUC issues with banner dismissal, correcting visibility checks for the sidebar filter in mobile dialogs, and refining ESLint ignore rules to maintain better code quality.

Comment thread eslint.config.js Resolved
The provider now honors the abort signal, so a query replaced by a newer
one skips fetching its result fragments. From Gemini's review on #155.
@sonarqubecloud

Copy link
Copy Markdown

@amondnet

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the apps/docs workspace from a Nuxt-based documentation site to an Astro-based site powered by @cloudflare/nimbus-docs. This involves replacing Nuxt configuration files, dependencies, and content files with Astro equivalents, including new Astro components, layouts, and styles. The review feedback correctly identifies a high-severity issue in wrangler.jsonc where the compatibility_date is set to a future date ('2026-11-19'), which will cause Cloudflare Wrangler to fail during builds or deployments.

Comment thread apps/docs/wrangler.jsonc
"database_id": "b4678772-c860-4609-89a4-08a804c9e916"
}
]
"compatibility_date": "2026-11-19",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

[HIGH] Future compatibility date in wrangler.jsonc

Problem: The compatibility_date is set to "2026-11-19", which is in the future. Cloudflare Wrangler will throw an error and fail to build or deploy if the compatibility date is in the future.
Rationale: Cloudflare Wrangler requires the compatibility_date to be a date in the past or present.
Suggestion: Change the compatibility_date to a current or past date (e.g., "2025-01-01").

  "compatibility_date": "2025-01-01",

@amondnet
amondnet merged commit d323021 into main Nov 23, 2026
10 checks passed
@amondnet
amondnet deleted the docs/nimbus-migration branch November 23, 2026 03:03
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.

1 participant