chore: update to latest astro ink version

This commit is contained in:
Timothy DeHerrera
2024-07-06 14:41:28 -06:00
parent 97aa45c32e
commit e4620874f9
84 changed files with 13949 additions and 4620 deletions

View File

@@ -0,0 +1,27 @@
---
export const prerender = true
import { getEntryBySlug, getCollection } from "astro:content";
import PostLayout from '$/layouts/post.astro';
import Code from '../../components/Code.astro'
export async function getStaticPaths() {
const allPosts = await getCollection('blog');
return allPosts.map(post => ({
params: {
slug: post.slug
}
}))
}
const { slug } = Astro.params
const entry = await getEntryBySlug('blog', slug!)
const { id, collection, data } = entry
const { Content } = await entry.render()
---
<PostLayout meta={{id, collection, slug }} content={data} >
<Content components={{
code: Code
}}/>
</PostLayout>