Define an HTTP route and its view.
| Kind | Keyword |
| Since | 0.1.0 |
| Repeatable | yes |
page <path> [layout <name>] [title <text>] [requires <clause>] [method <verb>]
| Name | Type | Required |
|---|---|---|
path |
path |
yes |
A page declares a URL path that the Kilnx runtime serves over HTTP. Its body contains the rendered view (HTML, fragments) and optional data-loading directives (queries, redirects, validations).
page /
html
<h1>Hello World</h1>
page /dashboard layout app title "Dashboard" requires auth
query @user_count: SELECT count(*) FROM users
html
<h1>{{ .user_count }} users</h1>
⚠ Implementation touched after spec. Source code changed on
2026-05-20, but this entity's spec was last edited on2026-05-08. The description may be out of date.
| Spec last touched | 5da8498 (2026-05-08) |
| Source last touched | af278bb (2026-05-20) |
| Source files | internal/parser/parser.go, internal/runtime/render.go |