File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,6 @@ const { author } = siteConfig
3535
3636<style lang =" css" >
3737 .post {
38- @apply grid grid-cols-1 mx-auto my-8 p-4 max-w-5xl;
38+ @apply grid grid-cols-1 mx-auto my-8 p-4 xl:px-0 max-w-5xl;
3939 }
4040</style >
Original file line number Diff line number Diff line change 1+ ---
2+ import { CollectionEntry , getCollection } from ' astro:content'
3+
4+ import PostLayout from ' @/layouts/PostLayout.astro'
5+
6+ export async function getStaticPaths() {
7+ const allPosts = await getCollection (' leetcode-solutions' )
8+ return allPosts .map ((entry ) => ({
9+ params: {
10+ slug: entry .slug ,
11+ },
12+ props: {
13+ entry ,
14+ },
15+ }))
16+ }
17+
18+ type Props = CollectionEntry <' leetcode-solutions' >
19+
20+ const { entry } = Astro .props
21+ const { Content } = await entry .render ()
22+ ---
23+
24+ <PostLayout frontmatter ={ entry .data } >
25+ <Content />
26+ </PostLayout >
You can’t perform that action at this time.
0 commit comments