Expand description

TODO

Structs

The properties needed to build an app.

The properties necessary to export an app.

Represents the data necessary to render a page, including document metadata.

A version of PageData that doesn’t contain the HTML content of the page. This is designed for being to sent to the client as part of a subsequent load, since the browser can render the HTML content of a page on its own.

Functions

Runs the build process of building many templates for the given locales data, building directly for all supported locales. This is fine because of how ridiculously fast builds are.

Builds a template, writing static data as appropriate. This should be used as part of a larger build process. This returns both a list of the extracted render options for this template (needed at request time), a list of pages that it explicitly generated, and a boolean as to whether or not it only generated a single page to occupy the template’s root path (true unless using using build-time path generation).

Builds all pages within a template and compiles its component of the render configuration.

Gets a translator and builds templates for a single locale.

Runs the build process of building many different templates for a single locale. If you’re not using i18n, provide a Translator::empty() for this. You should only build the most commonly used locales here (the rest should be built on demand).

Creates a translation file for exporting. This is broken out for concurrency.

Exports your app to static files, which can be served from anywhere, without needing a server. This assumes that the app has already been built, and that no templates are using non-static features (which can be ensured by passing true as the last parameter to build_app).

Exports a single path within a template.

Gets the static page data.