fix(blog): slug should be id
This commit is contained in:
parent
113248b6ed
commit
f6bae8d43c
2 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ import Blog from '../../layouts/Blog.astro'
|
|||
export async function getStaticPaths() {
|
||||
const posts = await getCollection('blog')
|
||||
return posts.map((post) => ({
|
||||
params: { slug: post.slug },
|
||||
params: { id: post.id },
|
||||
props: post,
|
||||
}))
|
||||
}
|
|
@ -115,7 +115,7 @@ const posts = (await getCollection('blog')).sort(
|
|||
<FormattedDate date={post.data.pubDate} />
|
||||
</small>
|
||||
<h4 class="title">
|
||||
<a href={`/blog/${post.slug}/`}>{post.data.title}</a>
|
||||
<a href={`/blog/${post.id}/`}>{post.data.title}</a>
|
||||
</h4>
|
||||
<p class="description">{post.data.description}</p>
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue