diff --git a/packages/starlight/layout/Page.astro b/packages/starlight/layout/Page.astro index 014ea8d51fe..bd0afa3aae5 100644 --- a/packages/starlight/layout/Page.astro +++ b/packages/starlight/layout/Page.astro @@ -86,7 +86,7 @@ const pagefindEnabled = } } - { entry.data.viewTransitions && } + { config.viewTransitions && } diff --git a/packages/starlight/schema.ts b/packages/starlight/schema.ts index 332a025ce9a..d0775e709cb 100644 --- a/packages/starlight/schema.ts +++ b/packages/starlight/schema.ts @@ -59,12 +59,6 @@ export function docsSchema() { */ template: z.enum(['doc', 'splash']).default('doc'), - /** - * Set ViewTransitions Astro component for this page. - * - */ - viewTransitions: z.boolean().optional().default(false), - /** Display a hero section on this page. */ hero: z .object({ diff --git a/packages/starlight/utils/user-config.ts b/packages/starlight/utils/user-config.ts index dcc69ee4398..601f32d2399 100644 --- a/packages/starlight/utils/user-config.ts +++ b/packages/starlight/utils/user-config.ts @@ -223,6 +223,12 @@ const UserConfigSchema = z.object({ */ defaultLocale: z.string().optional(), + /** + * Set ViewTransitions Astro component for this page. + * + */ + viewTransitions: z.boolean().optional().default(false), + /** Configure your site’s sidebar navigation items. */ sidebar: SidebarItemSchema.array().optional(),