Install OrbLayout, create your first project, and understand how the build pipeline works. By the end of this lesson, you'll have a working static site.
OrbLayout is a static site builder that lets you write HTML with superpowers. Think of it as a middle ground between hand-coding HTML and using a full JavaScript framework like React or Next.js.
With OrbLayout you get:
Why OrbLayout? If you need a website that's fast, SEO-friendly, and simple — but you're tired of copy-pasting the same header/footer into 50 HTML files — OrbLayout is for you.
OrbLayout runs on Node.js 16+. Make sure you have Node installed first.
# Install as a project dependency
npm install orblayout
# Or install globally
npm install -g orblayout
git clone https://github.com/rukkit-official/orblayout.git
cd orblayout
npm install
npx orb version
# → OrbLayout v1.2.0
If installed globally, you can use orb directly instead of npx orb.
The fastest way to start is with orb init. This creates the entire project structure for you.
mkdir my-website
cd my-website
npx orb init
This generates:
✓ Created orb.config.json
✓ Created pages/index.orb
✓ Created layouts/main.layout
✓ Created components/header.orb
✓ Created components/footer.orb
Project ready! Run 'orb dev' to start.
Every OrbLayout project follows this folder structure:
my-website/
│
├── 📄 orb.config.json ← Project configuration
│
├── 📂 pages/ ← Your pages (.orb files)
│ ├── index.orb ← → dist/index.html
│ ├── about.orb ← → dist/about.html
│ └── blog/
│ └── post.orb ← → dist/blog/post.html
│
├── 📂 components/ ← Reusable components
│ ├── header.orb
│ ├── footer.orb
│ └── card.orb
│
├── 📂 layouts/ ← Page layout templates
│ └── main.layout
│
├── 📂 assets/ ← Static files (images, CSS)
│ ├── style.css
│ └── logo.png
│
└── 📂 dist/ ← Build output (auto-generated)
├── index.html
└── about.html
| Folder | File Type | Purpose |
|---|---|---|
pages/ |
.orb |
Each file becomes an HTML page in dist/ |
components/ |
.orb |
Reusable UI blocks referenced by pages/layouts |
layouts/ |
.layout |
Page skeletons (HTML boilerplate) |
assets/ |
any | Static files copied as-is to dist/assets/ |
dist/ |
.html |
Final output — pure HTML, ready to deploy |
Let's build the site and see the output.
npx orb build
╔═══════════════════════════════════════╗
║ ◉ O r b L a y o u t v1.2.0 ║
║ Static Site Builder ║
╚═══════════════════════════════════════╝
Building pages...
✓ index.orb → index.html
✓ about.orb → about.html
Done! 2 page(s) compiled in 25ms
Output: dist/
Open dist/index.html in your browser — that's your compiled page!
For production, add --minify to compress the HTML output:
npx orb build --minify
During development, use the dev server for instant feedback:
npx orb dev
◉ OrbLayout Dev Server
Local: http://localhost:3000
Watching for changes...
[SSE] Live reload enabled
The dev server:
.orb and .layout files for changes/about instead of /about.html)npx orb dev --port 8080
Hot tip: Keep orb dev running in one terminal tab while you edit files. Your browser will auto-refresh every time you save!
OrbLayout's build pipeline is simple:
.orb page file
│
▼
┌──────────┐
│ Parser │ ← Extracts layout, components, data, loops, etc.
└────┬─────┘
▼
┌──────────┐
│ Compiler │ ← Resolves everything into pure HTML
└────┬─────┘
▼
┌──────────┐
│ Builder │ ← Writes .html files to dist/
└──────────┘
│
▼
Pure .html file
The key insight: everything happens at build time. Your visitors receive plain HTML files. No JavaScript framework loads, no API calls fire, no client-side rendering happens. It's just HTML.
Before moving on, make sure you can:
npm install orblayoutnpx orb initnpx orb buildnpx orb devdist/index.html in a browser and see your page