2024-08-24 06:28:25 +02:00
|
|
|
import { client } from "./sanity";
|
|
|
|
|
|
|
|
export const getAllBlogPostSlugs = async () => {
|
2024-09-07 09:12:48 +02:00
|
|
|
const query = `*[_type == 'blog'] { "slug": slug.current }`;
|
|
|
|
const slugs: { slug: string }[] = await client.fetch(query);
|
2024-08-24 06:28:25 +02:00
|
|
|
|
2024-09-07 09:12:48 +02:00
|
|
|
return slugs;
|
2024-08-24 06:28:25 +02:00
|
|
|
};
|