feat: improve JSON-LD
Déploiement FRONT PROD / check (push) Successful in 2m6s
Déploiement FRONT PROD / deploy (push) Successful in 21s

This commit is contained in:
2026-06-23 19:30:02 +04:00
parent 35e1a3a010
commit 3133145fd9
+16 -1
View File
@@ -80,8 +80,12 @@ export default async function AnPawolPaj(props) {
'@id': anTeks.musicBrainzUrl || undefined,
name: anTeks.titre,
url: `${siteUrl}/paroles/${slug}`,
inLanguage: anTeks.langueSource ?? 'ka',
image: teksKuvetiFormat?.url ? `${apiUrl}${teksKuvetiFormat?.url}` : undefined,
thumbnailUrl: couverture?.formats?.thumbnail?.url ? `${apiUrl}${couverture.formats.thumbnail.url}` : undefined,
license: anTeks.creativeCommons
? `https://creativecommons.org/licenses/${anTeks.creativeCommons.toLowerCase()}/4.0/`
: undefined,
byArtist: anTeks.artistes.map(({photo, musicBrainzUrl, alias, slug}) => {
const kuvetiFormat = formatKuveti(photo)
@@ -93,7 +97,18 @@ export default async function AnPawolPaj(props) {
image: kuvetiFormat?.url ? `${apiUrl}${kuvetiFormat?.url}` : undefined
}
}),
datePublished: anTeks?.annee
datePublished: anTeks?.annee,
potentialAction: anTeks.streamAudio?.length > 0
? anTeks.streamAudio.map(lyen => ({
'@type': 'ListenAction',
target: lyen.url
}))
: undefined,
isBasedOn: anTeks.sourceOriginale ? {
'@type': 'MusicRecording',
name: anTeks.sourceOriginale.titre,
url: `${siteUrl}/paroles/${anTeks.sourceOriginale.slug}`
} : undefined
}
return (