sort blog and learn by publish date

This commit is contained in:
saml33 2024-02-19 09:30:04 +11:00
parent ce6c50e7dd
commit c363e1100d
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ export async function fetchBlogPosts({
const blogPostsResult = await contentful.getEntries<TypeBlogPostSkeleton>({
content_type: 'blogPost',
include: 2,
order: ['fields.postTitle'],
order: ['-sys.createdAt'],
})
return blogPostsResult.items.map(

View File

@ -73,7 +73,7 @@ export async function fetchLearnPosts({
const learnPostsResult = await contentful.getEntries<TypeLearnPostSkeleton>({
content_type: 'learnPost',
include: 2,
order: ['fields.postTitle'],
order: ['-sys.createdAt'],
})
return learnPostsResult.items.map(