mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-25 12:52:47 -07:00
docs: add SSG page (#498)
Co-authored-by: Marco Pasqualetti <24919330+marcalexiei@users.noreply.github.com>
This commit is contained in:
@@ -130,13 +130,13 @@ export const sidebarElements: Array<SidebarElement> = [
|
||||
children: [
|
||||
{
|
||||
type: 'element',
|
||||
label: 'Server side rendering',
|
||||
label: 'Server side rendering (SSR)',
|
||||
href: '/documentation/rendering/server-side-rendering',
|
||||
},
|
||||
{
|
||||
type: 'element',
|
||||
label: 'Static site rendering',
|
||||
href: '/documentation/rendering/static-site-rendering',
|
||||
label: 'Static site generation (SSG)',
|
||||
href: '/documentation/rendering/static-site-generation',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -7,7 +7,7 @@ import MetaTags from '@/components/MetaTags'
|
||||
|
||||
import Breadcrumbs from '@/components/Breadcrumbs'
|
||||
|
||||
<Breadcrumbs breadcrumbs={[{ label: 'Rendering' }]} />
|
||||
<Breadcrumbs breadcrumbs={[{ label: 'SSR' }]} />
|
||||
|
||||
# Server side rendering
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import MetaTags from '@/components/MetaTags'
|
||||
|
||||
<MetaTags
|
||||
title="Tuono - Static site Generation"
|
||||
canonical="https://tuono.dev/documentation/rendering/static-site-generation"
|
||||
/>
|
||||
|
||||
import Breadcrumbs from '@/components/Breadcrumbs'
|
||||
|
||||
<Breadcrumbs breadcrumbs={[{ label: 'SSG' }]} />
|
||||
|
||||
# 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:
|
||||
|
||||
```sh
|
||||
tuono build —-static
|
||||
```
|
||||
|
||||
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.
|
||||
@@ -1,14 +0,0 @@
|
||||
import MetaTags from '@/components/MetaTags'
|
||||
|
||||
<MetaTags
|
||||
title="Tuono - Static site rendering"
|
||||
canonical="https://tuono.dev/documentation/rendering/static-site-rendering"
|
||||
/>
|
||||
|
||||
import Breadcrumbs from '@/components/Breadcrumbs'
|
||||
|
||||
<Breadcrumbs breadcrumbs={[{ label: 'Rendering' }]} />
|
||||
|
||||
# Static Site Rendering
|
||||
|
||||
TODO
|
||||
Reference in New Issue
Block a user