This commit is contained in:
10
src/routes/+page.ts
Executable file
10
src/routes/+page.ts
Executable file
@@ -0,0 +1,10 @@
|
||||
import type { PageLoad } from './$types';
|
||||
import { getBlogCollection } from '../app'
|
||||
|
||||
export const load: PageLoad = async ( fetch ) => {
|
||||
let posts = (await getBlogCollection()).slice(0, 5);
|
||||
|
||||
return {
|
||||
posts,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user