Initial commit

This commit is contained in:
Jonas_Jones 2023-09-15 20:24:31 +02:00 committed by GitHub
commit 09c002f1ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 2255 additions and 0 deletions

View file

@ -0,0 +1,10 @@
import { fetchMarkdownPages } from '$lib/utils';
import { json } from '@sveltejs/kit';
export const GET = async () => {
const allPosts = await fetchMarkdownPages();
// sort posts alphabetically
allPosts.sort((a, b) => a.path.localeCompare(b.path));
return json(allPosts);
};