File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ type ConditionalProps = (
1919) & {
2020 title: string ;
2121 description? : string | undefined ;
22+ image? : string | undefined ;
2223};
2324
2425export type Props = ConditionalProps & {
@@ -27,7 +28,7 @@ export type Props = ConditionalProps & {
2728
2829let pathname: string ;
2930const { class : className } = Astro .props ;
30- const { title, description } = Astro .props ;
31+ const { title, description, image } = Astro .props ;
3132if (' url' in Astro .props ) {
3233 ({ url: pathname } = Astro .props );
3334} else if (Astro .props .request ) {
@@ -66,6 +67,7 @@ if ('url' in Astro.props) {
6667 content ={ description ??
6768 ' Personal website for Ben Saufley, a software engineer and illustrator from Portland, Maine.' }
6869 />
70+ { image && <meta name = " og:image" content = { image } />}
6971 </head >
7072 <body class ={ clsx (className )} >
7173 <Header currentPath ={ pathname } />
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const published = dayjs.utc(date).startOf('day');
3636const { Content } = await post .render ();
3737---
3838
39- <BaseLayout title ={ title } >
39+ <BaseLayout title ={ title } image = { img ?. url } >
4040 <Post title ={ title } posted ={ published } headerImage ={ img } >
4141 <Content />
4242 </Post >
You can’t perform that action at this time.
0 commit comments