chore: some changes

This commit is contained in:
2024-03-07 18:45:26 +01:00
parent 16c8a6dd7a
commit cf9ac2994a
7 changed files with 112 additions and 99 deletions
+25
View File
@@ -0,0 +1,25 @@
---
import { getCollection } from 'astro:content'
import ArticleLayout from '../../layouts/ArticleLayout.astro'
export async function getStaticPaths() {
const blogEntries = await getCollection('guides')
return blogEntries.map(entry => ({
params: { slug: entry.slug },
props: { entry },
}))
}
const { entry } = Astro.props
const { Content } = await entry.render()
---
<ArticleLayout {...entry.data} pageName={['guide', entry.slug]}>
<div class="text-content">
<h1>{entry.data.title}</h1>
{entry.data.series && <h2>{entry.data.series}</h2>}
<Content />
</div>
</ArticleLayout>