trying again 02f1a9c7
Steve · 2023-03-01 08:03 1 file(s) · +3 −2
src/pages/og-image/[slug].png.ts +3 −2
41 41
	<div tw="flex flex-col flex-1 w-full p-10 justify-center">
42 42
		<p tw="text-2xl mb-6">${pubDate}</p>
43 43
		<h1 tw="text-6xl font-bold leading-snug text-white">${title}</h1>
44 -
		<h1 tw="text-2xl font-bold leading-snug text-white">${description}</h1>
44 +
		<h2 tw="text-2xl font-bold leading-snug text-white">${description}</h2>
45 45
	</div>
46 46
	<div tw="flex items-center justify-between w-full p-10 border-t border-[#a3be8c] text-xl">
47 47
		<div tw="flex items-center">
62 62
  const postDate = getFormattedDate(post?.data.publishDate ?? Date.now(), {
63 63
    weekday: "long",
64 64
  });
65 -
  const svg = await satori(markup(title, postDate), ogOptions);
65 +
  const description = post?.data.description ?? siteConfig.title;
66 +
  const svg = await satori(markup(title, postDate, description), ogOptions);
66 67
  const png = new Resvg(svg).render().asPng();
67 68
  return {
68 69
    body: png,