E104
Error
Syntax and structure
E104 — A layout with nowhere to put the page
A page's layout: is a component the page is placed in, at its default slot. A component that declares no slot has nowhere to put it.
What the compiler said
error[E104]: `Shell` declares no default slot, so the page has nowhere to go --> src/App.wf:2:57 | 2 | page P(path: "/", title: "T", description: "D", layout: Shell) { | ^^^^^ = help: Add `slot` to the component and place `children` where the page belongs = docs: https://webfluent.monzeromer.dev/errors/E104
The fix
Broken
component Shell { Text("frame") }
page P(path: "/", title: "T", description: "D", layout: Shell) {
Heading("Home").h1
}
Fixed
component Shell {
slot
Text("frame")
children
}
page P(path: "/", title: "T", description: "D", layout: Shell) {
Heading("Home").h1
}
Add slot to the component and place children where the page
belongs.
Each example is a whole program: it is all of src/App.wf in a project with no other .wf file (trying an example).
lints cannot lower it: it would ship a broken page.