webcompile/src/routes/blog/+page.server.ts

15 lines
277 B
TypeScript
Raw Normal View History

import type { PageServerLoad } from "./$types";
2023-02-18 22:12:23 +05:30
import { blogPosts } from "../../stores";
import { get } from "svelte/store";
2023-02-18 22:12:23 +05:30
export const load = (async () => {
2023-01-25 22:41:11 +05:30
const meta = {
title: "Blog"
2023-02-03 23:25:33 +05:30
};
2023-01-01 04:51:53 +05:30
return {
2023-02-18 22:12:23 +05:30
posts: get(blogPosts),
2023-01-25 22:41:11 +05:30
...meta
2023-01-01 04:51:53 +05:30
};
2023-02-03 23:25:33 +05:30
}) satisfies PageServerLoad;