Initial /api page.

This commit is contained in:
pheralb
2023-12-13 23:42:40 +00:00
parent 927cbdca6d
commit 18d7fe7cca
2 changed files with 58 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import { error } from '@sveltejs/kit';
export async function load() {
try {
const documentTitle = 'api';
const post = await import(`../../docs/${documentTitle}.md`);
return {
content: post.default,
meta: post.metadata
};
} catch (e) {
throw error(404, `Could not find this page`);
}
}