Skip to content

struct

Page

pub struct Page {
    pub slug: &'static str,
    pub title: &'static str,
    pub description: &'static str,
    pub body_class: &'static str,
    pub theme_color: &'static str,
    pub app: fn() -> Component,
    pub registry: fn() -> Registry,
    pub theme: fn() -> Theme,
}

One prerendered page.

Fields

slug

pub slug: &'static str

Output directory under the site root ("" for the root).

title

pub title: &'static str

The page's <title>.

description

pub description: &'static str

The page's meta description.

body_class

pub body_class: &'static str

Classes for <body>.

theme_color

pub theme_color: &'static str

The browser UI colour (<meta name="theme-color">).

app

pub app: fn() -> Component

Builds the page's root component.

registry

pub registry: fn() -> Registry

Every component the page uses.

theme

pub theme: fn() -> Theme

The Tailwind theme its CSS is generated with.