Skip to content

Commit

Permalink
Opengraph image path fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nsaunders committed Jul 30, 2023
1 parent 1c9fbdd commit 99a387f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/posts/[name]/opengraph-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ export const size = {

export const contentType = "image/png";

// Image generation
export default async function OpengraphImage({
export default async function Image({
params: { name },
}: {
params: { name: string };
}) {
const { title, description } = await Post.getByName(name);

return new ImageResponse(
(
<div
Expand Down
1 change: 1 addition & 0 deletions src/app/posts/[name]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export async function generateMetadata({
}: Props): Promise<Metadata> {
const { title, description } = await Post.getByName(name);
return {
metadataBase: new URL(meta.publicURL),
title: `${title}${meta.title}`,
description,
};
Expand Down

0 comments on commit 99a387f

Please sign in to comment.