From 8c3917ce79bd175a2afe7599c9fc7b2deb87da84 Mon Sep 17 00:00:00 2001 From: DuroCodes Date: Tue, 27 May 2025 14:57:19 -0400 Subject: [PATCH] fix: remove codeblock preview since discord doesn't support markdown in description --- src/app/[id]/page.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/app/[id]/page.tsx b/src/app/[id]/page.tsx index 35e6784..5572da4 100644 --- a/src/app/[id]/page.tsx +++ b/src/app/[id]/page.tsx @@ -39,17 +39,10 @@ export async function generateMetadata({ params }: Props) { }; const numLines = paste.content.split("\n").length; - const codeblockContent = paste.content - .split("\n") - .slice(0, 3) - .join("\n") - .replace(/`/g, "\\`"); - - const codeblockPreview = `\`\`\`${paste.language}\n${codeblockContent}\n\`\`\``; return { title: `spongebin • ${paste.id}`, - description: `a paste containing ${numLines} lines of ${paste.language}\ncode:\n${codeblockPreview}`, + description: `a paste containing ${numLines} lines of ${paste.language}`, openGraph: { images: "/sponge.png" }, twitter: { card: "summary" }, };