Skip to content

Commit

Permalink
Render ogp image on third party publish content item
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinyaigeek committed Sep 4, 2024
1 parent 62ce227 commit 97ccaea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const generateIndexPage: GenerateHandler<Context> = async ({
description: thirdPartyPublishContentItem.description,
publishedAt: thirdPartyPublishContentItem.publishedAt.toString(),
path: thirdPartyPublishContentItem.slug.toString(),
ogp: thirdPartyPublishContentItem.ogp.toString(),
};
},
);
Expand Down
3 changes: 3 additions & 0 deletions packages/applications/turbo-blog/src/ui/pages/Home/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Undefinable } from "option-t/esm/Undefinable";
import type { FunctionComponent } from "react";
import { FirstBoard } from "./components/FirstBoard/FirstBoard";
import { Item } from "./components/Item/Item";
Expand All @@ -8,6 +9,7 @@ interface Props {
description: string;
publishedAt: string;
path: string;
ogp?: Undefinable<string>;
}[];
}

Expand All @@ -22,6 +24,7 @@ export const Home: FunctionComponent<Props> = ({ items }) => (
description={item.description}
publishedAt={item.publishedAt}
path={item.path}
ogp={item.ogp}
/>
);
})}
Expand Down

0 comments on commit 97ccaea

Please sign in to comment.