hypra

LAYOUT-004: layout name isn't capitalized

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

Layouts, like components, start with a capital letter, so layout: Shop is clearly a name and not data.

Fails

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

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

}
error[LAYOUT-004]: layout names start with a capital letter
 --> page.hypra:1:8
  |
1 | layout shop(lang: "en", title_suffix: " | Shop") {
  |        ^^^^
  = help: layout Shop { ... }
  = docs: https://hypralang.dev/rules/layout-004/

1 error, 0 warnings

Fixed

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

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

}