mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-25 12:52:47 -07:00
docs: add TuonoScript component mention (#509)
Co-authored-by: Marco Pasqualetti <24919330+marcalexiei@users.noreply.github.com>
This commit is contained in:
@@ -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 <main>{children}</main>
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>
|
||||
{children}
|
||||
<TuonoScripts />
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
> ⚠️ This component is **not** optional and must include:
|
||||
>
|
||||
> - `<html>` and `body` HTML tags and the
|
||||
> - `<TuonoScripts />` component.
|
||||
|
||||
### Layout component for specific routes
|
||||
|
||||
A file created in this location will wrap only the routes defined within the `src/routes/posts` folder.
|
||||
|
||||
Reference in New Issue
Block a user