Sesame is a library of tools in OCaml for building smaller, greener, and more accessible static websites, inspired by Low Tech Magazine and designed around the concept of Collections. The project ships two layers: Sesame, the core suite of transformations, and Current_sesame, which plugs into the OCurrent ecosystem to produce incremental site generators with hot-reloading.
What is Sesame?
Sesame is a suite of tools written in OCaml for generating lightweight static websites. It takes Markdown files that include YAML frontmatter (the Jekyll format) and outputs HTML, with built-in support for table-of-contents generation and responsive image generation. The companion library, Current_sesame, combines these tools with the rest of the OCurrent ecosystem to build incremental site generators that can hot-reload during development. The project is hosted on GitHub and currently has 72 stars.
Key Features
- Collections — group documents that share a common metadata schema by defining an OCaml module referencing the
Metainterface. - Automatic ToC generation — Markdown transformations that produce a table of contents for each page.
- Responsive image generation — creates appropriately sized images so pages stay light and fast.
- OCurrent integration — Current_sesame turns Sesame primitives into pipelines for incremental builds with hot-reloading.
- Jekyll frontmatter support — reads metadata from YAML delimited by
---lines above the Markdown body. - Derived YAML parsing — uses
ppx_deriving_yamlto generate YAML parsers from OCaml record types, as shown in the tutorial. - Example site — the
./examplesdirectory contains basic working examples to start from.
Who is it for?
- OCaml developers — who want a type-safe, functional static site generator written in their preferred language.
- Low-impact web builders — who aim to publish sites that consume fewer resources, echoing the Low Tech Magazine approach.
- OCurrent pipeline users — who need incremental rebuilds and hot-reloading while developing a website.
What can you do with Sesame?
- Blog authors on OCaml — publish a blog where each post's title and author list are parsed from YAML frontmatter into an OCaml record.
- Green web advocates — generate lightweight pages with responsive images and minimal HTML output.
- Pipeline maintainers — set up an OCurrent pipeline that rebuilds only changed pages and serves them with hot-reloading.
How does Sesame work?
Define an OCaml type for your metadata (for example, fields like title and authors), annotate it to derive YAML parsing, write Markdown files with matching frontmatter, then use Sesame's transformations to render HTML. For incremental builds, Current_sesame wraps these tools in OCurrent pipelines that watch sources and hot-reload.
Alternatives
- Jekyll, a Ruby-based static site generator that also uses YAML frontmatter.
- Hugo, a Go-based static site generator known for its speed.
FAQ
Does Sesame support incremental builds?
Yes, through Current_sesame, which uses the OCurrent ecosystem to create pipelines with hot-reloading.
What is a Collection in Sesame?
A Collection is a group of documents that share a common metadata schema. You define the metadata interface in OCaml, and Sesame reads YAML frontmatter to match it.
What frontmatter format does Sesame use?
It uses the Jekyll format, which puts YAML metadata between triple-dash lines above the Markdown body.
Is Sesame free?
Sesame is a public GitHub project, so its source code is accessible, but the license is not stated in the provided content.








