Built resume template

This commit is contained in:
srleom
2024-03-19 16:14:57 +08:00
parent b266e46946
commit 36936150cf
73 changed files with 8970 additions and 0 deletions

View File

@ -0,0 +1,25 @@
---
export const prerender = true
import type { GetStaticPaths, InferGetStaticPropsType } from 'astro'
import PostLayout from '@/layouts/BlogPost.astro'
import { getAllPosts } from '@/utils'
export const getStaticPaths = (async () => {
const blogEntries = await getAllPosts()
return blogEntries.map((entry) => ({
params: { slug: entry.slug },
props: { entry }
}))
}) satisfies GetStaticPaths
type Props = InferGetStaticPropsType<typeof getStaticPaths>
const { entry } = Astro.props
const { Content } = await entry.render()
---
<PostLayout post={entry}>
<Content />
</PostLayout>