diff --git a/apps/documentation/src/routes/documentation/routing/defining-routes.mdx b/apps/documentation/src/routes/documentation/routing/defining-routes.mdx index 495f7c48..2050d6ff 100644 --- a/apps/documentation/src/routes/documentation/routing/defining-routes.mdx +++ b/apps/documentation/src/routes/documentation/routing/defining-routes.mdx @@ -62,15 +62,29 @@ This file won't generate any route. ### Layout component for all routes -A file created in this location will wrap all project route. +`src/routes/__layout.tsx` is a required file that defines the layout component that wraps the entire application. ```tsx // src/routes/__layout.tsx +import { TuonoScripts } from 'tuono' + export default function RootLayout({ children }) { - return
{children}
+ return ( + + + {children} + + + + ) } ``` +> ⚠️ This component is **not** optional and must include: +> +> - `` and `body` HTML tags and the +> - `` component. + ### Layout component for specific routes A file created in this location will wrap only the routes defined within the `src/routes/posts` folder.