prefetch links

This commit is contained in:
Joseph Montanaro
2021-10-19 10:26:50 -07:00
parent 18e8883063
commit a2a2b4f200
6 changed files with 53 additions and 15 deletions

View File

@@ -4,8 +4,7 @@
let post = await import(`./_posts/${page.params.slug}.svx`);
return {
props: {
meta: post.metadata,
body: post.default
post: post.default
}
}
}
@@ -19,8 +18,7 @@
</script>
<script>
import Post from '$lib/Post.svelte';
export let meta, body;
export let post;
</script>
<Post {meta} {body}></Post>
<svelte:component this={post} />