11 lines
223 B
TypeScript
Executable File
11 lines
223 B
TypeScript
Executable File
import type { PageLoad } from './$types';
|
|
import { getBlogCollection } from '../app'
|
|
|
|
export const load: PageLoad = async ( fetch ) => {
|
|
let posts = (await getBlogCollection()).slice(0, 5);
|
|
|
|
return {
|
|
posts,
|
|
};
|
|
};
|