Skip to content

Commit

Permalink
fix: 修复首页 近期文章 未正确获取完全的问题 (CaliCastle#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
CaliCastle authored Oct 21, 2023
2 parents 01b9d8e + 7a87771 commit 926023d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sanity/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const getLatestBlogPostsQuery = ({
}: GetBlogPostsOptions) =>
groq`
*[_type == "post" && !(_id in path("drafts.**")) && publishedAt <= "${getDate().toISOString()}"
&& defined(slug.current)][0...${limit}] | order(publishedAt desc) {
&& defined(slug.current)] | order(publishedAt desc)[0...${limit}] {
_id,
title,
"slug": slug.current,
Expand Down

0 comments on commit 926023d

Please sign in to comment.