docs
routing
Page Data

Page Data

$page variable provides data of page.

Example:

Typescript
export const $page = {};

#$page.before/after

A function that is run before/after processing request.

Typescript
export const $page = {
  before(ctx) {
  }
  after(ctx) {
  }
}