From ee15e27265cb76e947068789423f6d8670cf653f Mon Sep 17 00:00:00 2001 From: Ben Schlegel Date: Fri, 22 Sep 2023 12:17:10 +0200 Subject: [PATCH] fix: og preview on discord --- quartz/components/Head.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/quartz/components/Head.tsx b/quartz/components/Head.tsx index 19dca6f69..2a1bd46bd 100644 --- a/quartz/components/Head.tsx +++ b/quartz/components/Head.tsx @@ -73,8 +73,8 @@ async function generateSvg( /> , { - width: 1200, - height: 675, + width: ogHeight, + height: ogWidth, fonts: [ { name: fontName, @@ -97,6 +97,9 @@ async function generateSvg( fs.writeFileSync(`public/static/${filePath}.png`, pngBuffer) } +const ogHeight = 1200 +const ogWidth = 676 + export default (() => { let font: Promise function Head({ cfg, fileData, externalResources }: QuartzComponentProps) { @@ -136,6 +139,12 @@ export default (() => { + + + + + +