--- import type { ImageMetadata } from 'astro'; import type { CollectionEntry } from 'astro:content'; import BaseHead from '~/components/BaseHead.astro'; import Footer from '~/components/Footer.astro'; import Header from '~/components/Header.astro'; import { DEFAULT_LOCALE, type Locale } from '~/consts'; import { getLocaleFromUrl } from '~/i18n/ui'; interface Props { title: string; description: string; locale?: Locale; image?: ImageMetadata; /** Current content entry, used for the language switcher's translation lookup. */ entry?: CollectionEntry<'posts' | 'categories'>; /** Optional extra class on `
` for per-page styling hooks. */ bodyClass?: string; } const { title, description, image, entry, bodyClass, locale = getLocaleFromUrl(Astro.url) ?? DEFAULT_LOCALE, } = Astro.props; ---