Files
windwiderstand/src/routes/posts/+page.server.ts
T
Peter Meier da294010c8
Deploy / verify (push) Successful in 50s
Deploy / deploy (push) Failing after 1m3s
feat: update site URLs and enhance image handling
- Changed site URLs in docker-compose and deployment configurations to remove "www" prefix for consistency.
- Improved image handling by introducing warmPostCardImages function for pre-fetching images in posts and tags.
- Enhanced PostCard component with responsive image sizes for better performance.
- Updated layout to include robots meta tag and JSON-LD structured data for improved SEO.
- Added loading state for images in TopBanner component to enhance user experience.
2026-04-18 12:25:45 +02:00

26 lines
828 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { PageServerLoad } from './$types';
import { loadPostsList } from '$lib/blog-utils';
import { warmPostCardImages } from '$lib/rusty-image.server';
import { t, T } from '$lib/translations';
export const load: PageServerLoad = async ({ locals, fetch }) => {
const translations = locals.translations ?? {};
const result = await loadPostsList({ page: 1 });
warmPostCardImages(
result.posts as Array<{ _rawImageUrl?: string; _imageFocal?: { x: number; y: number } | null }>,
fetch,
);
return {
...result,
translations,
seoTitle: `${t(translations, T.posts_title)} Aktuelles`,
seoDescription: 'Übersicht aller Beiträge und Meldungen.',
breadcrumbItems: [
{ href: '/', label: t(translations, T.nav_start) },
{ label: t(translations, T.nav_posts) },
],
};
};