File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
packages/kit/src/lib/components/layout Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @svecodocs/kit " : patch
3+ ---
4+
5+ fix: Expose metadata through docspage
Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import PageHeader from " $lib/components/layout/page-header/page-header.svelte" ;
33 import Toc from " $lib/components/toc/toc.svelte" ;
4- import type { Component } from " svelte" ;
4+ import type { Component , ComponentProps } from " svelte" ;
55 import type { TOCEntry } from " $lib/types.js" ;
66 import Metadata from " ../metadata.svelte" ;
77
1010 title,
1111 description,
1212 toc,
13+ metadata = {},
1314 }: {
1415 component: Component ;
1516 title: string ;
1617 description? : string ;
1718 toc: TOCEntry [];
19+ metadata? : ComponentProps <typeof Metadata >;
1820 } = $props ();
1921
2022 const PageComponent = $derived (component );
2123 </script >
2224
23- <Metadata {title } {description } />
25+ <Metadata {... metadata } { title } {description } />
2426<aside class =" sticky" >
2527 <div class =" sticky top-24 hidden pl-16 xl:block" >
2628 <Toc toc ={{ items : toc }} />
You can’t perform that action at this time.
0 commit comments