From b2c5bc1633faf5e07350e798a9f22bb8d623914c Mon Sep 17 00:00:00 2001 From: Shivam Meena Date: Thu, 5 Oct 2023 09:01:20 +0530 Subject: [PATCH] pages cfw --- examples/cf-page-build/src/routes/+server.ts | 14 +------------- examples/cf-page-build/src/routes/cog/+server.ts | 16 +--------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/examples/cf-page-build/src/routes/+server.ts b/examples/cf-page-build/src/routes/+server.ts index a37c3f3..86a28a3 100644 --- a/examples/cf-page-build/src/routes/+server.ts +++ b/examples/cf-page-build/src/routes/+server.ts @@ -19,19 +19,7 @@ const template = ` `; -const fontFile = await fetch('https://og-playground.vercel.app/inter-latin-ext-400-normal.woff'); -const fontData: ArrayBuffer = await fontFile.arrayBuffer(); export const GET: RequestHandler = async () => { - return ImageResponse(template, { - height: 400, - width: 800, - fonts: [ - { - name: 'Inter', - data: fontData, - weight: 400 - } - ] - }); + return ImageResponse(template); }; diff --git a/examples/cf-page-build/src/routes/cog/+server.ts b/examples/cf-page-build/src/routes/cog/+server.ts index fbfb617..f2f91c8 100644 --- a/examples/cf-page-build/src/routes/cog/+server.ts +++ b/examples/cf-page-build/src/routes/cog/+server.ts @@ -2,23 +2,9 @@ import OG from './OG.svelte'; import type { RequestHandler } from '@sveltejs/kit'; import { componentToImageResponse } from '@ethercorps/sveltekit-og'; -const fontFile = await fetch('https://og-playground.vercel.app/inter-latin-ext-700-normal.woff'); -const fontData: ArrayBuffer = await fontFile.arrayBuffer(); - export const GET: RequestHandler = async () => { return componentToImageResponse( OG, - { text: 'Ready to dive in?', spanText: 'Start your free trial today.' }, - { - height: 250, - width: 500, - fonts: [ - { - name: 'Inter Latin', - data: fontData, - weight: 700 - } - ] - } + { text: 'Ready to dive in?', spanText: 'Start your free trial today.' } ); };