Layouts
_Base.astro
The HTML shell. It includes:
<head>with meta tags, fonts, daisyUI theme, JSON-LD, analytics script slot.- A navbar that reads
navigation.items(Alpine hover dropdown, mobile sidesheet). - A footer with site name, language switcher, and CookieBanner.
<slot name="head" />for blocks targeted attarget: "head".<ClientRouter />fromastro:transitionsfor View Transitions.
Article.astro
A thin wrapper around _Base that adds max-w-6xl mx-auto px-6 py-12. This is the Default starter layout — the article owns max width and padding.
Custom layouts
Add a new file in src/layouts/. Without an _ prefix, it appears in the MagiCMS layout dropdown. With an _ prefix, it is private (used as a base by other layouts).
Wrapping pattern: import _Base.astro, render <Layout title={...}><slot/></Layout> and add your own container.
Block targets
target: "main"(default) — block renders inside the layout's<main>viaBlockRenderer. Must wrap content in<Wrapper>(providesmb-8and any common classes).target: "head"— block renders inside_Base.astro's<slot name="head" />. Must not use<Wrapper>(would render a stray<div>in<head>).
Typical head blocks: SEO, PageJsonLd, Analytics, SiteFonts.