docs: fix arg name in live preview code example (#10127)

Updates outdated code example to match the current docs and api.
This commit is contained in:
Tobias Arends
2024-12-27 15:53:54 +01:00
committed by GitHub
parent eff75f9613
commit a49e63cd7a

View File

@@ -88,10 +88,10 @@ const config = buildConfig({
// highlight-start // highlight-start
url: ({ url: ({
data, data,
documentInfo, collectionConfig,
locale locale
}) => `${data.tenant.url}${ // Multi-tenant top-level domain }) => `${data.tenant.url}${ // Multi-tenant top-level domain
documentInfo.slug === 'posts' ? `/posts/${data.slug}` : `${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'],
}, },