This commit is contained in:
Mackie 2026-06-01 13:24:18 +08:00
parent 56d280f5ae
commit 5fa35146ca

View file

@ -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',