File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,11 @@ export default async function CookbookSlugPage({
4141 const slugPath = `cookbook/${ slug . join ( "/" ) } ` ;
4242 const navTree = buildNavTree ( path . join ( CONTENT_DIR , "cookbook" ) , "cookbook" ) ;
4343 return (
44- < DocsPageView slugPath = { slugPath } slugHrefPrefix = "" navTree = { navTree } />
44+ < DocsPageView
45+ slugPath = { slugPath }
46+ slugHrefPrefix = ""
47+ navTree = { navTree }
48+ sidebarBannerSlot = { null }
49+ />
4550 ) ;
4651}
Original file line number Diff line number Diff line change 1- // /cookbook — the cookbook landing page.
2- //
3- // Mirrors how /reference works today: a dedicated route with a sidebar
4- // scoped to its own meta.json tree, so opening the cookbook shows only
5- // the recipes — not the full Documentation tree.
6-
7- import path from "path" ;
81import type { Metadata } from "next" ;
9- import { DocsPageView } from "@/components/docs-page-view " ;
10- import { CONTENT_DIR , buildNavTree , loadDoc } from "@/lib/docs-render" ;
2+ import { redirect } from "next/navigation " ;
3+ import { loadDoc } from "@/lib/docs-render" ;
114import { buildDocMetadata } from "@/lib/seo-metadata" ;
125
136export const dynamic = "force-dynamic" ;
@@ -23,9 +16,5 @@ export async function generateMetadata(): Promise<Metadata> {
2316}
2417
2518export default function CookbookLandingPage ( ) {
26- // Scope the sidebar to the cookbook subtree only.
27- const navTree = buildNavTree ( path . join ( CONTENT_DIR , "cookbook" ) , "cookbook" ) ;
28- return (
29- < DocsPageView slugPath = "cookbook" slugHrefPrefix = "" navTree = { navTree } />
30- ) ;
19+ redirect ( "/cookbook/daytona" ) ;
3120}
Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ export interface DocsPageViewProps {
105105 navTree ?: NavNode [ ] ;
106106 /** Banner slot rendered above the main content column. */
107107 bannerSlot ?: React . ReactNode ;
108+ /** Banner slot rendered at the top of the sidebar. */
109+ sidebarBannerSlot ?: React . ReactNode ;
108110 /** When set, hide the main MDX body (used by pivot-only pages). */
109111 hideBody ?: boolean ;
110112 /**
@@ -142,6 +144,7 @@ export async function DocsPageView({
142144 frameworkOverride,
143145 navTree,
144146 bannerSlot,
147+ sidebarBannerSlot,
145148 hideBody = false ,
146149 ContentWrapper,
147150} : DocsPageViewProps ) {
@@ -199,7 +202,16 @@ export async function DocsPageView({
199202 const fumadocsToc = tocHeadingsToFumadocs ( tocHeadings ) ;
200203
201204 return (
202- < ShellDocsLayout tree = { pageTree } banner = { < SidebarFrameworkSelector /> } >
205+ < ShellDocsLayout
206+ tree = { pageTree }
207+ banner = {
208+ sidebarBannerSlot === undefined ? (
209+ < SidebarFrameworkSelector />
210+ ) : (
211+ sidebarBannerSlot
212+ )
213+ }
214+ >
203215 < DocsPage
204216 toc = { fumadocsToc }
205217 breadcrumb = { { enabled : false } }
Original file line number Diff line number Diff line change 22 "title" : " Cookbook" ,
33 "root" : true ,
44 "pages" : [
5- " index" ,
65 " ---Recipes---" ,
76 " daytona"
87 ]
You can’t perform that action at this time.
0 commit comments