Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: sites opengraph title and description added

sriram veeraghantafb3295f5f444
diff --git a/space/app/issues/[anchor]/layout.tsx b/space/app/issues/[anchor]/layout.tsx
index f4502a127f..91631d6c0b 100644
--- a/space/app/issues/[anchor]/layout.tsx
+++ b/space/app/issues/[anchor]/layout.tsx
@@ -16,7 +16,29 @@ export async function generateMetadata({ params }: Props) {
try {
const response = await fetch(`${process.env.NEXT_PUBLIC_API_BASE_URL}/api/public/anchor/${anchor}/meta/`);
const data = await response.json();
- return { title: data?.name || DEFAULT_TITLE, description: data?.description || DEFAULT_DESCRIPTION };
+ return {
+ title: data?.name || DEFAULT_TITLE,
+ description: data?.description || DEFAULT_DESCRIPTION,
+ openGraph: {
+ title: data?.name || DEFAULT_TITLE,
+ description: data?.description || DEFAULT_DESCRIPTION,
+ type: "website",
+ images: [
+ {
+ url: data?.cover_image,
+ width: 800,
+ height: 600,
+ alt: data?.name || DEFAULT_TITLE,
+ },
+ ],
+ },
+ twitter: {
+ card: "summary_large_image",
+ title: data?.name || DEFAULT_TITLE,
+ description: data?.description || DEFAULT_DESCRIPTION,
+ images: [data?.cover_image],
+ },
+ };
} catch {
return { title: DEFAULT_TITLE, description: DEFAULT_DESCRIPTION };
}