Files
personal-site/src/utils/projects.ts
T

7 lines
255 B
TypeScript

import { getCollection } from 'astro:content';
export async function getProjects() {
const all = await getCollection('projects', ({ data }) => import.meta.env.DEV || data.status !== 'draft');
return all.sort((a, b) => a.data.order - b.data.order);
}