hypra

LAYOUT-001: unknown layout

Error: the page doesn't build until this is fixed.

The page names a layout that isn't defined in the file or in a file it imports. Most often the use line is missing.

layout Shop(lang: "en", title_suffix: " | Shop") {
  header { a("/") "Shop" }
  main { slot }
}

Fails

page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.", layout: Shop) {
  h1 "Shoes"

}
error[LAYOUT-001]: unknown layout `Shop`
 --> page.hypra:1:103
  |
1 | page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.", layout: Shop) {
  |                                                                                                       ^^^^
  = help: define it with layout Name { ... } or import it with use "layouts/name.hypra"
  = docs: https://hypralang.dev/rules/layout-001/

1 error, 0 warnings

Fixed

use "layouts/shop.hypra"

page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.", layout: Shop) {
  h1 "Shoes"

}