Skip to content

Commit fcbfac7

Browse files
committed
feat: Include total clones in OG image metadata and update the OG image API endpoint.
1 parent 58d410d commit fcbfac7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎app/agents/[id]/page.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ export async function generateMetadata({ params }) {
3434
return { title: "Agent Not Found | Deforge" };
3535
}
3636

37-
const { name, category, slug } = templateData.template;
37+
const { name, category, slug, totalClones } = templateData.template;
3838

39-
const ogImageUrl = new URL(`${process.env.NEXT_PUBLIC_APP_URL}/api/og`);
39+
const ogImageUrl = new URL(`${process.env.NEXT_PUBLIC_API_URL}/og/template`);
4040
ogImageUrl.searchParams.set("title", name);
4141
ogImageUrl.searchParams.set("category", category);
42+
ogImageUrl.searchParams.set("clones", totalClones || 0);
4243

4344
return {
4445
title: `${name} - AI Agent Template | Deforge`,

0 commit comments

Comments
 (0)