feat: improve JSON-LD
This commit is contained in:
@@ -80,8 +80,12 @@ export default async function AnPawolPaj(props) {
|
|||||||
'@id': anTeks.musicBrainzUrl || undefined,
|
'@id': anTeks.musicBrainzUrl || undefined,
|
||||||
name: anTeks.titre,
|
name: anTeks.titre,
|
||||||
url: `${siteUrl}/paroles/${slug}`,
|
url: `${siteUrl}/paroles/${slug}`,
|
||||||
|
inLanguage: anTeks.langueSource ?? 'ka',
|
||||||
image: teksKuvetiFormat?.url ? `${apiUrl}${teksKuvetiFormat?.url}` : undefined,
|
image: teksKuvetiFormat?.url ? `${apiUrl}${teksKuvetiFormat?.url}` : undefined,
|
||||||
thumbnailUrl: couverture?.formats?.thumbnail?.url ? `${apiUrl}${couverture.formats.thumbnail.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}) => {
|
byArtist: anTeks.artistes.map(({photo, musicBrainzUrl, alias, slug}) => {
|
||||||
const kuvetiFormat = formatKuveti(photo)
|
const kuvetiFormat = formatKuveti(photo)
|
||||||
|
|
||||||
@@ -93,7 +97,18 @@ export default async function AnPawolPaj(props) {
|
|||||||
image: kuvetiFormat?.url ? `${apiUrl}${kuvetiFormat?.url}` : undefined
|
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 (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user