Prototype: unified email SDK docs (TS/Python language toggle)#144
Draft
stewartjarod wants to merge 1 commit into
Draft
Prototype: unified email SDK docs (TS/Python language toggle)#144stewartjarod wants to merge 1 commit into
stewartjarod wants to merge 1 commit into
Conversation
Explore the Stripe-style model — one docs page, a global language switcher that swaps every code sample (and the install command) at once, remembered in localStorage. Not linked in nav; noindex. For evaluation vs the separate-page approach. - /docs/email-sdk-unified: controlled CodeBlock driven by page-level lang state - Idiomatic TS and Python samples for install, send, attachments, templates, suppression, errors - Reuses existing CodeBlock/Snippet components — no new primitives Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TfF3tkuz2tWJkT543cdYbJ
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft / prototype — not for merge. Evaluating the Stripe-style docs model against our current separate-page-per-SDK approach.
What this shows
A single email SDK docs page at
/docs/email-sdk-unifiedwith a global TypeScript / Python toggle that switches every code sample — and the install command — at once. The choice is remembered inlocalStorage, so it persists across visits (and would across pages).CodeBlock(controlled mode) +Snippetcomponents — no new primitivesnoindexWhy
We now have two SDKs (TS + Python) and more coming. The separate-page model duplicates prose per language and grows combinatorially. This is the pattern Stripe/Twilio/Supabase use to keep one source of truth for concepts with per-language code.
To evaluate
Open the Vercel preview →
/docs/email-sdk-unified, flip the toggle, refresh to confirm persistence. Compare against the shipped separate pages (/docs/sdk-reference,/docs/python-sdk-reference).🤖 Generated with Claude Code
https://claude.ai/code/session_01TfF3tkuz2tWJkT543cdYbJ