Static Site Generation
Overview
🚧 This feature is experimental and still misses few case scenarios. It will be stabilized soon.
Tuono is a progressive framework that meets all development needs, from building simple apps without server capabilities to creating fully server side rendered applications with dynamic data.
If a page uses Static Generation, its HTML is generated at build time and reused on each request. It can also be cached by a CDN.
In Tuono, you can statically generate pages with or without data.
For the current development stage the whole app has to opt for SSG or SSR. Mixed rendering strategies are not available yet.
Usage
To build a project statically just run:
This command builds all the JS and CSS assets, and also pre-renders each page into its own separate index.html
file.
You can still use #[tuono_lib::handler]
to load remote data,
but it will only be loaded at build time.