switch to directly importing post, and install static adapter
This commit is contained in:
@@ -3,18 +3,18 @@
|
||||
let post = await import(`./_posts/${page.params.slug}.svx`);
|
||||
return {
|
||||
props: {
|
||||
metadata: post.metadata,
|
||||
BlogPost: post.default
|
||||
meta: post.metadata,
|
||||
body: post.default
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export let metadata, BlogPost;
|
||||
export let meta, body;
|
||||
</script>
|
||||
|
||||
<div id="post">
|
||||
<h1>{metadata.title}</h1>
|
||||
<svelte:component this={BlogPost} />
|
||||
<h1>{meta.title}</h1>
|
||||
<svelte:component this={body} />
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user