fix(blog): restore prev/next post navigation buttons (#346)

Co-authored-by: 0bipinnata0 <0bipinnata0@users.noreply.github.com>
This commit is contained in:
0bipinnata0and0bipinnata0 authored and GitHub committed 2025-03-28 22:28:17 +09:00
1 parent d15139ad11
commit b826152352
2 files changed
+5 -9

No files matched your search

+2 -3
View File
@@ -13,11 +13,10 @@ import PostMetadata from '../../components/PostMeta.astro'
import ImageWrapper from '../../components/misc/ImageWrapper.astro'
import { profileConfig, siteConfig } from '../../config'
import { formatDateToYYYYMMDD } from '../../utils/date-utils'
import { getSortedPosts } from '@utils/content-utils'
export async function getStaticPaths() {
const blogEntries = await getCollection('posts', ({ data }) => {
return import.meta.env.PROD ? data.draft !== true : true
})
const blogEntries = await getSortedPosts();
return blogEntries.map(entry => ({
params: { slug: entry.slug },
props: { entry },