switch to directly importing post, and install static adapter

This commit is contained in:
Joseph Montanaro
2021-10-18 15:54:45 -07:00
parent d0aaba7a7d
commit af6b065de8
9 changed files with 48 additions and 24 deletions

View File

@@ -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>