R01

Error

Routes

R01 — A route to nothing

A link, a navigate() or a Route names a page or a path that no page has.

What the compiler said

error[R01]: `/abuot` is not a route: no page's `path` matches it --> src/App.wf:3:5 | 3 | Link("About us", to: "/abuot") | ^^^^ = help: The nearest is `/about` = docs: https://webfluent.monzeromer.dev/errors/R01

Your editor offers this fix: Change to /about. wf fix --code R01 applies it to every place it fits.

The fix

Broken

wf

page Home(path: "/", title: "T", description: "D") { Heading("Home").h1 Link("About us", to: "/abuot") } page About(path: "/about", title: "About", description: "D") { Heading("About").h1 }

Fixed

wf

page Home(path: "/", title: "T", description: "D") { Heading("Home").h1 Link("About us", to: "/about") } page About(path: "/about", title: "About", description: "D") { Heading("About").h1 }

Link to a route a page has; the message names the nearest. A spliced link is checked by its shape — "/team/{t.slug}" must match a route like /team/:slug — a link with no leading / is refused (where it leads would depend on the page it is on), and a link to a file (/report.pdf) or another site is left alone.

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