S02
Warning
Search and sharing
S02 — A page with no description
A page has no description:, so its search snippet is written for it.
What the compiler said
warning[S02]: Page P has no description --> src/App.wf:1:1 | 1 | page P(path: "/", title: "T") { | ^^^^ = help: Add one: page Name(path: "/", title: "…", description: "A sentence a search result can show") = docs: https://webfluent.monzeromer.dev/errors/S02
The fix
Broken
page P(path: "/", title: "T") {
Heading("No description").h1
}
Fixed
page P(path: "/", title: "T", description: "What a reader gets from this page.") {
Heading("No description").h1
}
Add a description: of about 150 characters: what a reader gets from the page.
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 may lower it:
"lints": { "S02": "off" }
// wf-allow(S02)