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 @@ -7,17 +7,19 @@ import siteConfig from '@/configs/site'
77import AppLayout from ' @/layouts/AppLayout.astro'
88
99interface Props {
10+ slug: string
1011 frontmatter: CollectionEntry <' leetcode-solutions' >[' data' ]
1112}
1213
13- const { frontmatter } = Astro .props
14+ const { slug, frontmatter } = Astro .props
1415const { author } = siteConfig
1516---
1617
1718<AppLayout
1819 headerCssClasses =" max-w-5xl"
1920 title ={ frontmatter .title }
2021 description ={ frontmatter .title }
22+ image ={ ` ${Astro .site }images/${slug }.png ` }
2123 canonicalURL ={ frontmatter .canonicalURL }
2224 keywords ={ [
2325 ... ((frontmatter .keywords as string []) || []),
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const { entry } = Astro.props
2323const { Content } = await entry .render ()
2424---
2525
26- <PostLayout frontmatter ={ entry .data } >
26+ <PostLayout frontmatter ={ entry .data } slug = { entry . slug } >
2727 <Content />
2828 {
2929 isPluginEnabled (' disqus' ) && (
You can’t perform that action at this time.
0 commit comments