This commit is contained in:
Morten Olsen
2024-03-30 20:53:01 +01:00
commit 98e39a54cc
94 changed files with 11654 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import { getCollection } from 'astro:content';
class References {
public find = () => getCollection('references');
public get = async (slug: string) => {
const collection = await this.find();
return collection.find((entry) => entry.slug === slug);
};
}
type Reference = Exclude<Awaited<ReturnType<References['get']>>, undefined>;
export { References, type Reference };