more yak shaving
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
<script context="module">
|
||||
export async function load({ fetch }) {
|
||||
const resp = await fetch('/all.json');
|
||||
const allPosts = (await resp.json());
|
||||
const post = await import(`./_posts/${allPosts[0].slug}.svx`);
|
||||
const resp = await fetch('/latest.json');
|
||||
const metadata = (await resp.json());
|
||||
const post = await import(`./_posts/${metadata.slug}.svx`);
|
||||
return {
|
||||
props: {
|
||||
meta: post.metadata,
|
||||
@ -13,8 +13,8 @@
|
||||
</script>
|
||||
|
||||
<script>
|
||||
import BlogPost from './[slug].svelte';
|
||||
import Post from '$lib/Post.svelte';
|
||||
export let meta, body;
|
||||
</script>
|
||||
|
||||
<BlogPost {meta} {body}></BlogPost>
|
||||
<Post {meta} {body}></Post>
|
||||
|
Reference in New Issue
Block a user