Astro · Components and layouts
Create a layout
A layout wraps pages and renders their content with <slot />.
---
const { title } = Astro.props;
---
<html lang="en">
<head><title>{title}</title></head>
<body>
<slot />
</body>
</html>
Astro · Components and layouts
A layout wraps pages and renders their content with <slot />.
---
const { title } = Astro.props;
---
<html lang="en">
<head><title>{title}</title></head>
<body>
<slot />
</body>
</html>
Was this page helpful?