mirror of
https://github.com/JonasunderscoreJones/wiki.jonasjones.dev.git
synced 2025-10-23 22:29:18 +02:00
Initial commit
This commit is contained in:
commit
09c002f1ae
25 changed files with 2255 additions and 0 deletions
10
src/routes/__internal_api/+server.js
Normal file
10
src/routes/__internal_api/+server.js
Normal 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);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue