feat: add better metadata with number of lines and language

This commit is contained in:
DuroCodes
2025-04-25 02:09:02 -04:00
parent b4ac78df63
commit 560832ff5e

View File

@@ -38,9 +38,11 @@ export async function generateMetadata({ params }: Props) {
twitter: { card: "summary" },
};
const numLines = paste.content.split("\n").length;
return {
title: `spongebin • ${paste.id}`,
description: "a pastebin made with sponge",
description: `a paste containing ${numLines} lines of ${paste.language}`,
openGraph: { images: "/sponge.png" },
twitter: { card: "summary" },
};