Skip to content

Latest commit

 

History

History
71 lines (50 loc) · 1.52 KB

File metadata and controls

71 lines (50 loc) · 1.52 KB

page

Define an HTTP route and its view.

Kind Keyword
Since 0.1.0
Repeatable yes

Syntax

page <path> [layout <name>] [title <text>] [requires <clause>] [method <verb>]

Arguments

Name Type Required
path path yes

Description

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).

Children

Examples

Hello world

page /
  html
    <h1>Hello World</h1>

Authenticated page with layout and title

page /dashboard layout app title "Dashboard" requires auth
  query @user_count: SELECT count(*) FROM users
  html
    <h1>{{ .user_count }} users</h1>

See also

Provenance

Implementation touched after spec. Source code changed on 2026-05-20, but this entity's spec was last edited on 2026-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