Skip to content

struct

App

pub struct App {
    pub pages: Vec<Page>,
    pub layouts: Vec<Unit>,
    pub components: Vec<Unit>,
    pub not_found: Option<Unit>,
    pub template: String,
    pub mode: String,
    pub base: String,
    pub remote_origins: BTreeSet<String>,
}

Everything in app/ and components/.

Fields

pages

pub pages: Vec<Page>

Numbered depth-first through the layout tree.

layouts

pub layouts: Vec<Unit>

The layouts, outermost first.

components

pub components: Vec<Unit>

The shared components in components/.

not_found

pub not_found: Option<Unit>

app/not-found.weft, if there is one.

template

pub template: String

The root template: layouts around a ladder of if route <= n.

mode

pub mode: String

[app] mode in weft.toml: hybrid, mpa or spa.

base

pub base: String

[app] base in weft.toml: where the app is served (/, /blog/).

remote_origins

pub remote_origins: BTreeSet<String>

The other sites the templates load data from (src, load and get), as scheme://host[:port]: where the relay may forward.

Trait implementations