Embedding the reference
1. Publish the reference
Embedding needs a published reference: see Publishing.
2. Copy the snippet
The Reference panel on the project's page shows the snippet for your project. It looks like this:
<iframe src="https://latitude10.tech/r/<workspace>/<project>/embed" title="Pets API reference" width="100%" height="800" loading="lazy"></iframe>3. Choose a theme
Add ?theme=light or ?theme=dark to the src to fix the theme. Without it, the embed follows the reader's system setting.
What the embed allows
- Only
/embedmay be framed: it sendsframe-ancestors *. Every other page of the reference sendsframe-ancestors 'none'. - The embed has no site bar, and otherwise shows what the public reference shows, Try it included.
- If you unpublish, the embed shows that the reference isn't published, instead of an error page.
Where this comes from
app/workspace/[ws]/[project]/page.tsxapp/r/_lib/respond.tsapp/r/[ws]/[project]/embed/route.tsapp/reference/_lib/access.ts