Skip to content

Commit

Permalink
feat: view transition in user config
Browse files Browse the repository at this point in the history
  • Loading branch information
abosch19 committed Sep 9, 2023
1 parent 4b477fc commit 3718419
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/starlight/layout/Page.astro
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const pagefindEnabled =
}
}
</style>
{ entry.data.viewTransitions && <ViewTransitions /> }
{ config.viewTransitions && <ViewTransitions /> }
</head>
<body>
<ThemeProvider />
Expand Down
6 changes: 0 additions & 6 deletions packages/starlight/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
6 changes: 6 additions & 0 deletions packages/starlight/utils/user-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),

Expand Down

0 comments on commit 3718419

Please sign in to comment.