port docs to sveltekit (very broken)

This commit is contained in:
alyssa 2025-12-19 22:19:23 -05:00
parent 17ee73f264
commit b19c900cc3
39 changed files with 3275 additions and 8052 deletions

View file

@ -0,0 +1,7 @@
<script>
let { data } = $props();
</script>
<div class="max-w-full bg-base-200 prose">
<div class="m-5" style="max-width: 900px"><data.PageContent /></div>
</div>

View file

@ -0,0 +1,16 @@
import { error } from '@sveltejs/kit';
const pages = import.meta.glob('/content/**/*.md', { eager: true }) as Record<string, { default: unknown }>;
export async function load({ params }) {
const slug = params.slug || 'index';
const page = pages[`/content/${slug}.md`] || pages[`/content/${slug}/index.md`];
if (!page) {
throw error(404, `Page not found: ${slug}`);
}
return {
PageContent: page.default
};
}