Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/trueberryless-org/mindspace. Thoughtless blogs about God and the world mindspace.trueberryless.org
Something went wrong. Try again.
12345678910111213141516171819202122232425262728---import { type CollectionEntry, getCollection } from 'astro:content'import PostLayout from '@/layouts/PostLayout.astro'import { render } from 'astro:content'
export async function getStaticPaths() { const posts = await getCollection('posts') return posts .filter((post) => !post.id.startsWith('_')) .map((post) => ({ params: { slug: post.id }, props: post }))}
type Props = CollectionEntry<'posts'>
const post = Astro.propsconst { Content, remarkPluginFrontmatter } = await render(post)
const readingTime = remarkPluginFrontmatter.readingTimeconst toc = remarkPluginFrontmatter.toc || []---
<PostLayout {...post.data} readingTime={readingTime} toc={toc}> <Content /></PostLayout>