Merged in feat/SW-1956-add-English-caption-fallback (pull request #2574)
Feat/SW-1956 add English caption fallback * feat(SW-1956): add English fallback to gallery caption * feat(SW-1956): add English fallback to gallery caption Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { env } from "@/env/server"
|
||||
|
||||
import type { Breadcrumbs } from "@scandic-hotels/trpc/types/breadcrumbs"
|
||||
import type { HotelData } from "@scandic-hotels/trpc/types/hotel"
|
||||
import type {
|
||||
BreadcrumbList,
|
||||
Hotel as HotelSchema,
|
||||
@@ -7,9 +9,6 @@ import type {
|
||||
WithContext,
|
||||
} from "schema-dts"
|
||||
|
||||
import type { HotelData } from "@scandic-hotels/trpc/types/hotel"
|
||||
import type { Breadcrumbs } from "@scandic-hotels/trpc/types/breadcrumbs"
|
||||
|
||||
export function generateBreadcrumbsSchema(breadcrumbs: Breadcrumbs) {
|
||||
const itemListElement: ListItem[] = breadcrumbs.map((item, index) => ({
|
||||
"@type": "ListItem",
|
||||
@@ -63,7 +62,7 @@ export function generateHotelSchema(hotelData: HotelData) {
|
||||
jsonLd.image = {
|
||||
"@type": "ImageObject",
|
||||
url: image.imageSizes.small,
|
||||
caption: image.metaData.title,
|
||||
caption: image.metaData.title || image.metaData.title_En,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user