What problem does this solve?
Publishing documentation in a single language leaves significant search visibility on the table — both for traditional Google rankings and for AI-powered engines like Perplexity, ChatGPT, and Google AI Overviews. This playbook shows how to design a bilingual Mintlify docs architecture (English + Spanish) using Gemini for high-level GEO/SEO strategy, then pipe that strategy output directly into a Claude terminal agent to implement it — including fixing Next.jsServer Component / Client Component boundary bugs that surface during the process.
The core insight: publishing bilingual content under a single domain with proper hreflang injection doubles the surface area for AI citation and organic indexing, while domain consolidation preserves shared authority rather than splitting it across subdomains. As translatepress.com explains, subdirectory content benefits from the full authority of the main domain, making it easier to rank — in both languages.
Before you start
- A Mintlify repo already initialized with a working
mint.json - Access to Gemini (gemini.google.com or API) for strategy generation
- Claude running as a terminal agent (Claude Code CLI or equivalent) pointed at your repo
- Node.js / Next.js App Router project if you have custom components in the docs site
- Basic familiarity with
hreflangtags and JSON config files - Screenshots tool or OS screenshot shortcut — you’ll pass visual bug context directly to the agent
Steps
Query Gemini for a bilingual GEO/SEO strategy
Start in Gemini, not in your codebase. Prompt it with your exact publishing intent so it can reason about best practices before any code is written.At Gemini returned two key architectural recommendations:
60% of multilingual sites have hreflang errors, leading to wrong language versions being surfaced and ranking drops — getting this right from the start matters.Gemini’s output included example JSON snippets for
2:50, the prompt used was:| Strategy | What it means |
|---|---|
| Domain Consolidation | Keep /en/ and /es/ as subdirectories under one domain — not separate subdomains — so all SEO authority accumulates in one place |
| Hreflang Injection | Add hreflang tags (via mint.json or a custom <head> component) so search engines serve the correct language version and avoid duplicate-content penalties |
mint.json. Copy the full response text — you’ll use it verbatim in the next step.Paste Gemini's output into the Claude terminal agent
At This is the handoff pattern: Gemini handles broad research and architectural reasoning; Claude handles hands-on repo implementation. You’re not asking Claude to invent the SEO strategy — you’re giving it a fully-reasoned spec and asking it to execute.This manual paste workflow maps directly to what practitioners describe as role-separation in multi-model pipelines: Gemini for large-scale analysis and research, Claude as the implementation orchestrator. A more automated version uses a
5:00, the dev pasted Gemini’s full strategy response directly into the terminal where the Claude agent was running, then issued:/gemini slash command to route between models without leaving the terminal — but the manual paste achieves the same result and requires no extra tooling setup.Claude then generated a full implementation plan covering:- Bilingual folder structure (
/en/,/es/directories in the Mintlify repo) mint.jsonupdates for navigation and locale confighreflangtag injection strategy
Fix Next.js Server/Client Component boundary errors via screenshot context
During implementation, a Rather than debugging manually, the dev passed both the error text and a screenshot of the visual bug to the Claude agent in the terminal:A second prompt addressed a UI state bug — a selection bar that was always visible instead of appearing only when moments were selected:Claude resolved both: the
next/headers error surfaced in the browser at 1:20. This happens when a module that uses Next.js App Router APIs gets imported into a Pages Router or Client Component context.next/headers fix involved moving the import to a proper Server Component boundary; the selection bar fix was a React state initialization issue.Passing a screenshot alongside the error message gives the agent visual context that stack traces alone don’t provide — especially for layout/state bugs where the symptom is positional rather than textual.
Validate the bilingual folder structure and hreflang config
After Claude applies the implementation plan, verify two things manually:1. Folder structure2. Run the Mintlify dev server and confirm both language routes resolve without 404s before merging.
mint.json hreflang entries — confirm each page pair is linked bidirectionally. A correct setup looks like:Common pitfalls
What we learned
1. Gemini → Claude as a two-stage pipeline is faster than single-model prompting. Asking one model to both design an SEO architecture and implement it in a specific repo produces mediocre results at both tasks. Splitting the work — Gemini for strategy, Claude for implementation — produced a concrete, repo-ready plan in one/plan invocation (5:00).
2. Screenshot context collapses the bug-report loop. The next/headers error and the selection bar UI bug were both resolved by the agent without the dev touching the code manually. Passing a screenshot alongside the error message at 1:20 gave Claude enough visual + textual context to identify root causes that stack traces alone wouldn’t surface.
3. Bilingual Mintlify docs are a GEO multiplier, not just an SEO one. The rationale stated at 2:50 — more visibility, more awareness, more volume — applies equally to AI-generated answers. Structured bilingual docs under a single domain mean your content can be cited in both English and Spanish AI Overviews independently, doubling citation surface without doubling domain authority cost.