mirror of
https://github.com/bartvdbraak/hellob.art.git
synced 2025-06-28 07:19:09 +00:00
fix: make sure vite is doing its thing
This commit is contained in:
parent
ea491c3148
commit
791d2cae8f
3 changed files with 20 additions and 7 deletions
|
@ -26,4 +26,7 @@
|
|||
h2 {
|
||||
font-family: 'Geist Bold', 'Geist Sans';
|
||||
}
|
||||
p {
|
||||
font-family: 'Geist Regular', 'Geist Sans';
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import satori from 'satori';
|
||||
import { Resvg } from '@resvg/resvg-js';
|
||||
import { html as toReactNode } from 'satori-html';
|
||||
import { html } from 'satori-html';
|
||||
import { OgImage } from '$lib/components/site';
|
||||
import GeistRegular from '$lib/assets/og/Geist-Regular.woff';
|
||||
import GeistBold from '$lib/assets/og/Geist-Bold.woff';
|
||||
|
@ -16,7 +16,7 @@ export const GET = async ({ url }) => {
|
|||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const result = (OgImage as any).render({ title, subTitle, imageData });
|
||||
const element = toReactNode(`${result.html}<style>${result.css.code}</style>`);
|
||||
const element = html(`${result.html}<style>${result.css.code}</style>`);
|
||||
|
||||
const svg = await satori(element, {
|
||||
fonts: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue