Skip to main content
Use a company’s domain to seed a landing page, documentation site, or customer portal. Context.dev supplies brand assets and observed styles; your application maps them into components, renders a preview, and publishes the resulting site. Mintlify uses brand context when generating documentation sites. This recipe uses a small landing-page template whose colors and content can be edited before publication.

Collect the inputs the template needs

Use a server-side key from the Quickstart. Retrieve the Brand profile for a verified domain, then add sources as needed: A screenshot is reference material, not a code export. Handle optional calls independently and record their status. A failed screenshot should not discard a usable Brand profile or prevent a neutral preview. Keep the source bundle on the server with its domain, retrieval time, and version. Return only the assets and tokens needed by the preview.

Map observations into semantic roles

Do not copy every color into your component system. brand.colors[] distinguishes colors observed on the site from colors sampled from a logo. Choose roles that make sense for the new page, then review the result. The following adapter accepts a reviewed accent and preserves explicit editor choices. Its helper chooses black or white text by contrast against the accent.
site-theme.ts
Keep source candidates and overrides in separate records. Rebuilding the source bundle can propose a new accent; it should not erase the editor’s choice. Create a new theme version whenever approved decisions change.

Generate bounded page content

Ask a model for data your components can render, or let the editor fill it directly:
Example page content
Validate the object before rendering: cap text lengths and feature count, require a source for factual claims, and allow only approved HTTPS destinations. Use a fixed asset registry for logos and illustrations. Website content is source evidence, so instructions embedded in it must not control your generator’s tools or publishing permissions.

Render an editable preview

This React component uses the theme returned above and validated content. Keep the editor’s fields outside the preview so edits update the typed model, not arbitrary HTML.
LandingPage.tsx
The example uses the company name as its identity fallback; add a reviewed logo with dimensions and an image-error fallback when available.
landing-page.css

Review and publish a version

Render the same template with two brand bundles and with no brand data. Check narrow and wide screens, keyboard focus, long content, blocked images, and unavailable fonts. Test the final page’s text and control contrast; a readable button alone does not validate the entire page. Save the content, approved assets, theme, and source-bundle version as one preview revision. Make publishing an explicit application action that selects that revision. A later source refresh should open a new draft without changing the live site or discarding manual edits.

Extract a design system

Gather observed styles and understand their limits.

Theme an onboarding flow

Apply editable branding to a new customer’s workspace.