Update Docs for SDK Satellite Domain API and Script Tag Usage#3327
Update Docs for SDK Satellite Domain API and Script Tag Usage#3327SarahSoutoul wants to merge 29 commits into
Conversation
This reverts commit 8092e55.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…uide Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@alexisintech @manovotny okay think I've addressed all comments and feedback on this! Let me know thoughts |
|
I've posted my docs review:
I think this is fantastic work for the scope of this PR - very nice job Sarah!!
We can tag team the follow up work if that interests you, we can pair on it :) There is an example in the demo repo of how to do satellite apps for React SDK apps: https://github.com/clerk/clerk-multidomain-demo Nice work on this Sarah 😸💖 |
|
another question! do we want to keep pages router support in this? we haven't been adding pages router examples to our guides, and imo, I think we can remove it! the examples are not much different. |
Yeah that's a fair statement! Let me remove them. In terms of the rest, thanks for creating a ticket - happy to work on this with you and pair. Def think we could make this guide even better by making it SDK-specific, but as you said, not the scope of this PR/ ticket. |
|
Okay @alexisintech - have done the following:
I'll look at the ticket you created next and come up with a proposal, and we can jump on a call sometime next week to discuss. |
…re signature Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Pushed some changes directly in 112443b.
|
|
|
||
| await clerk.load({ | ||
| ui: { ClerkUI: window.__internal_ClerkUICtor }, | ||
| + isSatellite: true, |
There was a problem hiding this comment.
Heads up: the regenerated reference this guide links to shows load() typed as Without<ClerkOptions, 'isSatellite'> — while the ClerkOptions table on the same page lists isSatellite.
The guide is right at runtime: clerk-js's load() accepts full ClerkOptions, the isSatellite getter reads it from there, and the constructor only takes domain/proxyUrl, so load() is the only path for plain JS.
clerk/javascript#8845 fixes the description and clerk/javascript#8846 fixes the type — once those release, the Typedoc sync resolves the contradiction. Nothing to change in this PR.
🔎 Previews:
What does this solve? What changed?
A customer integrating satellite domains with ClerkJS was confused because the required configuration is split across two places:
domainonly works when set during initializationisSatelliteis configured duringload()That split was not obvious in the docs, especially for script-tag users, and it led to trial-and-error around where each option belongs. The docs also did not clearly state that script-tag attributes must be prefixed with
data-clerk-*, which made the CDN integration path harder to discover and easier to misconfigure. These updates make the configuration model explicit and add examples for the non-Next.js cases that were missing.In addition to solving this issue, I also restructured a lot of the page to make it look for UI friendly and easier to read, using
<Tabs>and<CodeBlockTabs>. The changes also add/ fix anything that was wrong or confusing when testing this myself.What changed
domainmust be set during initialization, whileisSatelliteis set inClerk.load()data-clerk-*prefix@clerk/clerk-jsand raw<script>integrationsDeadline
No rush.
Other resources
Linear: https://linear.app/clerk/issue/DOCS-11525/update-docs-for-sdk-satellite-domain-api-and-script-tag-usage