netlify test

This commit is contained in:
Shivam Meena
2023-06-07 22:00:57 +05:30
parent b65f12d3a2
commit 82ff2df427
21 changed files with 6475 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
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
}
]
}
);
};