feat: hizkuntza adierazten du gaztelerazko post-etan
This commit is contained in:
1 parent
c20983c9bb
commit
4db754ea16
8 files changed
+31
-17
No files matched your search
@@ -3,20 +3,20 @@ import { type CollectionEntry, getCollection, render } from "astro:content";
|
||||
import BlogPost from "../../layouts/BlogPost.astro";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts: CollectionEntry<"posts">[] = await getCollection("posts");
|
||||
const posts: CollectionEntry<"posts">[] = await getCollection("posts");
|
||||
|
||||
return posts.map((post) => {
|
||||
return {
|
||||
params: { slug: post.data.slug },
|
||||
props: { post },
|
||||
};
|
||||
});
|
||||
return posts.map((post) => {
|
||||
return {
|
||||
params: { slug: post.data.slug },
|
||||
props: { post },
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
const { post } = Astro.props;
|
||||
const { Content } = await render(post);
|
||||
---
|
||||
|
||||
<BlogPost content={post.data}>
|
||||
<Content />
|
||||
<BlogPost post={post}>
|
||||
<Content />
|
||||
</BlogPost>
|
||||
Reference in new issue
Block a user