SEM-007: imported file contains a page
Error: the page doesn't build until this is fixed.
use imports components and layouts. A file with a page in it is a page of its own; importing it would put
two pages in one. Move what both pages share into a component.
page(title: "About us", description: "Who we are: a small team of runners selling the shoes we run in.") {
h1 "About us"
}component Team {
p "A small team of runners selling the shoes we run in."
}Fails
use "about.hypra"
page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
h1 "Shoes"
}error[SEM-007]: imported files can't contain a page
--> about.hypra:1:1
|
1 | page(title: "About us", description: "Who we are: a small team of runners selling the shoes we run in.") {
| ^^^^
= help: imported files hold components and layouts
= docs: https://hypralang.dev/rules/sem-007/
1 error, 0 warningsFixed
use "components/team.hypra"
page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
h1 "Shoes"
Team
}