docs: updates building your own live preview hook (#3604)

This commit is contained in:
Jacob Fletcher
2023-10-12 14:20:02 -04:00
committed by GitHub
parent 05eba56d7d
commit 15c7f0dbf3
2 changed files with 31 additions and 9 deletions

View File

@@ -85,7 +85,7 @@ Here is an example of using a function that returns a dynamic URL:
locale
}) => `${data.tenant.url}${ // Multi-tenant top-level domain
documentInfo.slug === 'posts' ? `/posts/${data.slug}` : `${data.slug !== 'home' : `/${data.slug}` : ''}`
`}?locale=${locale}`, // Localization query param
}${locale ? `?locale=${locale?.code}` : ''}`, // Localization query param
collections: ['pages'],
},
}