Closed zeshhaan closed 2 years ago
The groq query for allPosts doesn't fetch current category title and slug. Also it doesn't fetch author name.
Here is how it looks now
export const allPosts = `*[_type == 'post']{categories[]->{slug, title}, ...} | order(publishedAt desc)`;
Here is the fix that worked for me
export const allPosts = `*[_type == 'post']{..., categories[]->{title, slug}, author -> {name}} | order(publishedAt desc)`;
Thanks
Thanks for filing this issue @zeshhaan! It should be fixed in the next branch already and will be merged in with #12 after Astro releases their official v1.0 version which (hopefully) is very soon.
next
The groq query for allPosts doesn't fetch current category title and slug. Also it doesn't fetch author name.
Here is how it looks now
Here is the fix that worked for me
Thanks