File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 11<script lang =" ts" >
2- let { data } = $props ();
2+ import type { PageData } from ' ./$types'
3+
4+ let { data }: { data: PageData } = $props ()
35 const title = $derived (data .page .frontmatter ?.title );
46 </script >
57
Original file line number Diff line number Diff line change 11<script lang =" ts" >
2+ import type { PageData } from " ./$types" ;
3+
24 import Sidebar from " $lib/components/Sidebar.svelte" ;
35 import TableOfContents from " $lib/components/TableOfContents.svelte" ;
46
5- let { data } = $props ();
7+ let { data }: { data : PageData } = $props ();
68 const title = $derived (data .page .frontmatter ?.title ?? " A great page" );
79 const headings = $derived (data .page .headings );
810 </script >
1618 <div class =" hidden md:block" >
1719 <Sidebar />
1820 </div >
19- <div class ="prose {headings ? " sm:col-span-3" : " sm:col-span-4" } {headings ? " md:col-span-4" : " md:col-span-5" }" >
21+ <div
22+ class ="prose {headings ? ' sm:col-span-3' : ' sm:col-span-4' } {headings
23+ ? ' md:col-span-4'
24+ : ' md:col-span-5' }"
25+ >
2026 <h1 >{title }</h1 >
2127 <data .page .default />
2228 </div >
Original file line number Diff line number Diff line change 11import { error , type HttpError } from "@sveltejs/kit" ;
22import type { MarkdocModule } from "markdoc-svelte" ;
33
4+ import type { PageLoad } from "./$types" ;
5+
46interface Pages {
57 [ pagePath : string ] : ( ) => Promise < MarkdocModule > ;
68}
79
8- export const load = async ( { params } ) => {
10+ export const load : PageLoad = async ( { params } ) => {
911 const slug = params . slug ;
1012 try {
1113 // Get all of the pages in the content directory
You can’t perform that action at this time.
0 commit comments