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 }`;
|
2024-09-13 16:14:41 +02:00
|
|
|
const slugs: { slug: string }[] = await client.fetch(
|
|
|
|
query,
|
|
|
|
{},
|
|
|
|
{ cache: "no-store" }
|
|
|
|
);
|
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
|
|
|
};
|