18 Exporting static sites with Sapper
This chapter covers
- Exporting Sapper apps to generate static sites
- When to export apps
- An example exported app
Exporting can be desirable for apps where it is possible to generate the HTML for every page at build time.
A common example is a blog site, where users can navigate to specific posts. Authors periodically add blog posts, and the new posts only become available when the site is regenerated. Site generation can be automated so it occurs on a regular basis, such as every night. The site can also be automatically regenerated every time there is a push to its source repository.
Static sites have excellent runtime performance. One reason is that the HTML for each page only has to be downloaded, not ...