- Introduced a new international page with dynamic content loading. - Updated Card component to display article date if available. - Removed unused about and contact pages. - Cleaned up package-lock.json by removing unnecessary dependencies.
13 lines
407 B
TypeScript
13 lines
407 B
TypeScript
import { items } from '$lib/international';
|
|
import type { PageServerLoad } from './$types';
|
|
|
|
export const load: PageServerLoad = async () => ({
|
|
data: await Promise.all(
|
|
[...items.entries()].map(async ([path, load]) =>
|
|
load().then(({ metadata }) => ({ path, ...metadata }))
|
|
)
|
|
).then((data) =>
|
|
data.sort(({ date: a }, { date: z }) => new Date(z ?? 0).getTime() - new Date(a ?? 0).getTime())
|
|
)
|
|
});
|