---
// Import the global.css file here so that it is included on
// all pages through the use of the component.
import '~/styles/global.css';
import type { ImageMetadata } from 'astro';
import FallbackImage from '~/assets/blog-placeholder-1.jpg';
import { DEFAULT_LOCALE, type Locale, SITE } from '~/consts';
import { getLocaleFromUrl, switchLocalePath } from '~/i18n/ui';
import { Font } from 'astro:assets';
interface Props {
title: string;
description: string;
image?: ImageMetadata;
locale?: Locale;
}
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const {
title,
description,
image = FallbackImage,
locale = getLocaleFromUrl(Astro.url) ?? DEFAULT_LOCALE,
} = Astro.props;
const otherLocale: Locale = locale === 'de' ? 'en' : 'de';
const alternateHref = new URL(switchLocalePath(Astro.url.pathname, otherLocale), Astro.site);
const rssHref = new URL(locale === 'de' ? 'rss.xml' : 'en/rss.xml', Astro.site);
---