import { Link, Meta, Title } from "@solidjs/meta"; import { useLocation } from "@solidjs/router"; import JsonLd from "~/components/JsonLd"; import { site } from "~/config"; import { t } from "~/i18n"; import { OG_IMAGE, pageGraph } from "~/lib/schema"; /** Per-page title/description plus the Open Graph tags link previews need. */ export default function Seo(props: { title: string; description: string; /** Use the title as given, rather than appending the brand suffix. */ full?: boolean; /** Short nav label for the home → page trail. Off for the landing page. */ breadcrumb?: string; /** Extra schema.org nodes describing what the page lists. */ schema?: object[]; }) { const location = useLocation(); const title = () => (props.full ? props.title : `${props.title} — ${t.meta.titleSuffix}`); const url = () => `${site.url}${location.pathname}`; return ( <>