9 lines
228 B
TypeScript
9 lines
228 B
TypeScript
|
import { client } from "./sanity";
|
||
|
|
||
|
export const getAllBlogPostSlugs = async () => {
|
||
|
const query = `*[_type == 'blog'] { "slug": slug.current }`;
|
||
|
const slugs: { slug: string }[] = await client.fetch(query);
|
||
|
|
||
|
return slugs;
|
||
|
};
|