Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Generate image blocks

Tim Wilson6b506cf2d617
diff --git a/apps/web/lib/actions/partners/generate-lander.ts b/apps/web/lib/actions/partners/generate-lander.ts
index abe2c8a16a..02f69cac98 100644
--- a/apps/web/lib/actions/partners/generate-lander.ts
+++ b/apps/web/lib/actions/partners/generate-lander.ts
@@ -75,6 +75,9 @@ export const generateLanderAction = authActionClient
`Generate a basic landing page for an affiliate program powered by Dub Partners based on a company website. ` +
`Do not include any initial header/hero content because the landing page will already have an initial title and subtitle. ` +
`Do not make any assumptions about the terms or rewards associated with the program. ` +
+ (scrapeResult.metadata?.ogImage
+ ? `You may include an image block in the landing page, only using the OG image here: ${scrapeResult.metadata?.ogImage}. `
+ : "") +
`Markdown is supported in "text" blocks, but use it sparingly. ` +
`Avoid using links. Relevant CTA links are already on the landing page. ` +
// Program details
diff --git a/apps/web/lib/zod/schemas/program-lander.ts b/apps/web/lib/zod/schemas/program-lander.ts
index abc829cc75..81f86f90d2 100644
--- a/apps/web/lib/zod/schemas/program-lander.ts
+++ b/apps/web/lib/zod/schemas/program-lander.ts
@@ -90,6 +90,7 @@ export const programLanderSchema = z.object({
// Simpler schemas for AI generation
export const programLanderSimpleBlockSchema = z.discriminatedUnion("type", [
+ programLanderImageBlockSchema,
programLanderTextBlockSchema,
programLanderAccordionBlockSchema,
programLanderEarningsCalculatorBlockSchema,