mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
✨ Initial /api page.
This commit is contained in:
@@ -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`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user