floter.design/src/routes/work/+page.server.ts
2026-01-07 20:41:01 +13:00

28 lines
680 B
TypeScript

import { fetchMarkdownPosts } from '../../lib/importMarkdown'
export async function load() {
try {
const posts = await fetchMarkdownPosts()
if (!posts) {
console.error('No posts found')
return {
posts: [],
title: 'Work References',
description: 'A few of the projects I have worked on'
}
}
return {
posts,
title: 'Work References',
description: 'A few of the projects I have worked on'
}
} catch (error) {
console.error('Error loading work posts:', error)
return {
posts: [],
title: 'Work References',
description: 'A few of the projects I have worked on'
}
}
}