diff --git a/apps/site/keystatic.config.ts b/apps/site/keystatic.config.ts index 689cb5501..218184783 100644 --- a/apps/site/keystatic.config.ts +++ b/apps/site/keystatic.config.ts @@ -224,6 +224,7 @@ export default config({ authors: collection({ label: 'Authors', path: 'src/content/authors/*', + previewUrl: `/preview/start?branch={branch}&to=/authors/{slug}`, slugField: 'name', schema: { name: fields.slug({ @@ -241,6 +242,7 @@ export default config({ articles: collection({ label: 'Articles', path: 'src/content/articles/*', + previewUrl: `/preview/start?branch={branch}&to=/articles/{slug}`, slugField: 'name', schema: { name: fields.slug({ diff --git a/apps/site/src/app/preview/start/route.tsx b/apps/site/src/app/preview/start/route.tsx index cb896ad26..8e87065a0 100644 --- a/apps/site/src/app/preview/start/route.tsx +++ b/apps/site/src/app/preview/start/route.tsx @@ -14,5 +14,6 @@ export async function GET(req: Request) { const toUrl = new URL(to, url.origin); toUrl.protocol = url.protocol; toUrl.host = url.host; + toUrl.searchParams.set('brand', 'wbc'); redirect(toUrl.toString()); }