docs: fixes typo in ternary operator for live preview docs (#13163)

Fixes ternary operator in live preview docs.
This commit is contained in:
Sean Zubrickas
2025-07-29 10:56:31 -07:00
committed by GitHub
parent e50220374e
commit 72954ce9f2

View File

@@ -88,17 +88,16 @@ const config = buildConfig({
// ... // ...
livePreview: { livePreview: {
// highlight-start // highlight-start
url: ({ url: ({ data, collectionConfig, locale }) =>
data, `${data.tenant.url}${
collectionConfig, collectionConfig.slug === 'posts'
locale ? `/posts/${data.slug}`
}) => `${data.tenant.url}${ // Multi-tenant top-level domain : `${data.slug !== 'home' ? `/${data.slug}` : ''}`
collectionConfig.slug === 'posts' ? `/posts/${data.slug}` : `${data.slug !== 'home' : `/${data.slug}` : ''}` }${locale ? `?locale=${locale?.code}` : ''}`, // Localization query param
}${locale ? `?locale=${locale?.code}` : ''}`, // Localization query param
collections: ['pages'], collections: ['pages'],
}, },
// highlight-end // highlight-end
} },
}) })
``` ```