Skip to content

Commit

Permalink
Improve og:images
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenbleasel committed Nov 20, 2024
1 parent ce48f64 commit e8a7d5f
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,21 @@ export const generateMetadata = async ({ params }: PageProps) => {
notFound();
}

const components = ['calendar', 'gantt', 'kanban', 'list', 'table'];

return {
title: page.data.title,
description: page.data.description,
openGraph: {
images:
slug && components.includes(slug[0])
? [
{
url: `/og/${slug[0]}.png`,
},
]
: undefined,
},
} satisfies Metadata;
};

Expand Down
Binary file modified app/opengraph-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/og/calendar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/og/gantt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/og/kanban.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/og/list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/og/table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e8a7d5f

Please sign in to comment.