Getting Started
hadley is a static site generator built for Bun. It processes Markdown content, applies templates, and builds a static website — without magic.
Prerequisites
- Bun ≥ 1.0
Project structure
A hadley project looks like this:
my-site/
├── config.lima # Site configuration
├── content/
│ └── pages/
│ └── [home]/
│ └── home.md # Your home page
└── theme/
├── assets/
│ └── css/
│ └── style.css
└── templates/
├── home.chase # Layout template
└── partials/
└── head.sort # Reusable partial
Configuration
config.lima defines your site settings:
site:
origin: https://my-site.com
default:
title: My Site
language: en
Your first page
Pages live in content/pages/[slug]/. The folder name in brackets becomes the URL slug. A home page at [home] maps to /.
content/pages/[home]/home.md:
---
title: Welcome
template: home
---
Hello from hadley.
Templates
Templates use .chase for layouts and .sort for partials. Variables are wrapped in { }:
<!DOCTYPE html>
<html lang="{ meta.lang }">
<head>
<title>{ meta.title }</title>
</head>
<body>
<h1>{ meta.title }</h1>
{@raw markup}
</body>
</html>
Building
# Development server with live reload
bun run dev
# Production build
bun run build
Packages
hadley is built from focused packages you can also use standalone:
| Package | Description |
|---|---|
@mkorun/lima |
Frontmatter parser |
@mkorun/galley |
Template engine |
@mkorun/quad |
HTML formatter |