Finally finish this enough to post
From here I will actually track changed with git but I just needed a base to work from. RIP this attomic ass commit
This commit is contained in:
parent
079e48c94e
commit
4bdb2ca436
48 changed files with 4693 additions and 657 deletions
17
src/pages/posts/[...slug].astro
Normal file
17
src/pages/posts/[...slug].astro
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
import { getCollection, render } from 'astro:content';
|
||||
import MarkdownPostLayout from '../../layouts/MarkdownPostLayout.astro';
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = await getCollection('blog');
|
||||
return posts.map(post => ({
|
||||
params: { slug: post.id }, props: { post },
|
||||
}));
|
||||
}
|
||||
|
||||
const { post } = Astro.props;
|
||||
const { Content } = await render(post);
|
||||
---
|
||||
<MarkdownPostLayout frontmatter={post.data}>
|
||||
<Content />
|
||||
</MarkdownPostLayout>
|
Loading…
Add table
Add a link
Reference in a new issue