S01

Warning

Search and sharing

S01 — A page with no title

A page has no title:.

What the compiler said

warning[S01]: Page P has no title --> src/App.wf:1:1 | 1 | page P(path: "/", description: "D") { | ^^^^ = help: Add one: page Name(path: "/", title: "What this page is") = docs: https://webfluent.monzeromer.dev/errors/S01

The fix

Broken

wf

page P(path: "/", description: "D") { Heading("No title").h1 }

Fixed

wf

page P(path: "/", title: "Home", description: "D") { Heading("No title").h1 }

page P(path: "/", title: "What this page is").

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": { "S01": "off" } // wf-allow(S01)