Skip to content

Commit

Permalink
sort blog and learn by publish date
Browse files Browse the repository at this point in the history
  • Loading branch information
saml33 committed Feb 18, 2024
1 parent ce6c50e commit c363e11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contentful/blogPost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion contentful/learnPost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c363e11

Please sign in to comment.