mirror of
https://github.com/hanzoai/calendar.git
synced 2026-09-24 22:42:24 +00:00
Three surfaces the earlier pass missed, and the embed is the one that matters
most: packages/embeds/embed-core runs inside a CUSTOMER's page and its
stylesheet carried @font-face src url("https://cal.com/cal.ttf") — so every
page anyone put our embed on made a request to our upstream's domain and told
that host about the visit. An embed has no business fetching a face at all; the
headings inherit the host page's stack.
The OG route fetched Inter-Regular.ttf and Inter-Medium.ttf and registered them
as "inter", so every share card was set in a face the product stopped using —
satori reads ttf, which is why the variable file could not serve it. Zen's
static cuts, carried beside them.
shared-globals declared Cal Sans and Inter var; one Zen variable file covers
both roles. The transactional emails linked and @imported fonts.googleapis.com
for Roboto and Inter.
JSX email templates
componentsHolds reusable patternstemplatesA template equals a type of email sent
Usage
import renderEmail from "@calcom/emails/renderEmail";
await renderEmail("TeamInviteEmail", {
language: t,
from: "[email protected]",
to: "[email protected]",
teamName: "Team Pro",
joinLink: "https://cal.com",
});
The first argument is the template name as defined inside templates/index.ts. The second argument are the template props.
Development
You can use an API endpoint to preview the email HTML, there's already one on /apps/web/pages/api/email.ts feel free to change the template to the one you're currently working on.