mirror of
https://github.com/SrIzan10/spongebin.git
synced 2026-05-01 11:05:09 +00:00
feat: add better metadata with number of lines and language
This commit is contained in:
@@ -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" },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user