preview
This commit is contained in:
parent
56d280f5ae
commit
5fa35146ca
1 changed files with 10 additions and 1 deletions
|
|
@ -35,6 +35,15 @@ export default buildConfig({
|
|||
},
|
||||
user: Users.slug,
|
||||
livePreview: {
|
||||
url: ({ data, collectionConfig, globalConfig }) => {
|
||||
const baseURL = getServerSideURL()
|
||||
if (globalConfig) {
|
||||
return `${baseURL}/preview/globals/${globalConfig.slug}`
|
||||
}
|
||||
return `${baseURL}/preview/${collectionConfig?.slug}/${data?.slug ?? data?.id}`
|
||||
},
|
||||
collections: ['pages', 'posts'],
|
||||
globals: ['header', 'footer'],
|
||||
breakpoints: [
|
||||
{
|
||||
label: 'Mobile',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue