Merged in SW-3490-set-metadata-for-routes (pull request #2881)

SW-3490 set metadata for routes
* feat(SW-3490): Set metadata title for hotelreservation paths

Approved-by: Anton Gunnarsson
This commit is contained in:
Joakim Jäderberg
2025-10-01 11:34:52 +00:00
parent 4f151b143e
commit df8e223d23
25 changed files with 440 additions and 37 deletions

View File

@@ -27,6 +27,7 @@ export async function generateMetadata({
const { subpage, filterFromUrl, ...otherSearchParams } = await searchParams
// If there are other (real) search params, we don't want to index the page as this will
// cause duplicate content issues.
const noIndexOnSearchParams = !!Object.keys(otherSearchParams).length
const caller = await serverClient()
const { rawMetadata, alternates, robots } =
@@ -129,7 +130,7 @@ async function getTransformedMetadata(
) {
const metadata: Metadata = {
metadataBase: env.PUBLIC_URL ? new URL(env.PUBLIC_URL) : undefined,
title: await getTitle(data),
title: { absolute: await getTitle(data) },
description: await getDescription(data),
openGraph: {
images: getImage(data),