hypra

SEM-004: image or video has no source

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

An image or video without a src shows nothing. The source is the element's main attribute, so it comes first and needs no name.

Fails

page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
  h1 "Shoes"
  img(alt: "Runner X in blue, side view")
}
error[SEM-004]: `img` needs `src`
 --> page.hypra:3:3
  |
3 |   img(alt: "Runner X in blue, side view")
  |   ^^^
  = help: img("/photo.jpg", alt: "...")
  = docs: https://hypralang.dev/rules/sem-004/

1 error, 0 warnings

Fixed

page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
  h1 "Shoes"
  img("/img/runner-x.jpg", alt: "Runner X in blue, side view")
}