Skip to content

Latest commit

 

History

History

ssg

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Ranu.js Static Site Generation (SSG) Example

This example demonstrates how to build pre-rendered, CDN-ready static websites with Ranu.js.

Concept Demonstrated

  • Static render mode: Setting export const render = 'static' instructs the compiler to pre-render the route into standalone HTML files (.ranu/build/static/pages/*.html)
  • Zero-compute serving: Output static pages require no Node.js execution at runtime, enabling instant time-to-first-byte (TTFB)

Project Structure

├── app/
│   ├── about/
│   │   └── page.tsx       # export const render = 'static'
│   ├── layout.tsx         # Shared root layout
│   ├── page.tsx           # Static home page
│   └── pricing/
│       └── page.tsx       # export const render = 'static'
├── package.json
├── ranu.config.ts
└── tsconfig.json

Running the Example

pnpm dev

Build and inspect the pre-rendered HTML in .ranu/build/static/:

pnpm build