Skip to content

struct

AppSite

pub struct AppSite {
    pub routes: Routes,
    pub registry: fn() -> Registry,
    pub theme: fn() -> Theme,
    pub title: &'static str,
    pub description: &'static str,
    pub body_class: &'static str,
    pub theme_color: &'static str,
}

An app made from app/ (see weft::app!), to prerender.

Fields

routes

pub routes: Routes

The routes generated from app/.

registry

pub registry: fn() -> Registry

Every component, the app's own among them.

theme

pub theme: fn() -> Theme

The Tailwind theme its CSS is generated with.

title

pub title: &'static str

For pages whose meta sets none.

description

pub description: &'static str

The meta description for pages whose meta sets none.

body_class

pub body_class: &'static str

Classes for every page's <body>.

theme_color

pub theme_color: &'static str

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