S03

Warning

Search and sharing

S03 — A description too long for a search result

A description longer than about 160 characters, which a search result truncates.

What the compiler said

warning[S03]: Page P's description is 178 characters; a search result shows about 160 --> src/App.wf:1:1 | 1 | page P(path: "/", title: "T", description: "A description that goes on for far longer than any search result will ever show, because it keeps adding clauses, qualifications and asides until the snippet is cut mid-sentence.") { | ^^^^ = help: Shorten it, or accept that it will be cut mid-sentence = docs: https://webfluent.monzeromer.dev/errors/S03

The fix

Broken

wf

page P(path: "/", title: "T", description: "A description that goes on for far longer than any search result will ever show, because it keeps adding clauses, qualifications and asides until the snippet is cut mid-sentence.") { Heading("Long").h1 }

Fixed

wf

page P(path: "/", title: "T", description: "A description that says what the page holds, in a sentence a search result shows whole.") { Heading("Long").h1 }

Shorten it to about 160 characters.

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