[ANN] YOCaml, a framework for static site generator

[ANN] YOCaml 3.0.0

It had been a while since we announced a release of YOCaml (since 2.5.0), but this weekend we released version 3.0.0 (already available on OPAM)!

Since version 2.5.0, many changes have been made to YOCaml, which you can read about in the release notes for the various versions released over the months: (2.6.0, 2.7.0, 2.8.0).

Some major innovations that can be noted are:

  • YOCaml finally deletes files that it did not create, which allows for intermediate build steps that construct finer caches (making it possible, for example, to create backlinks or transclusions) (yocaml#108)

  • As mentioned by @benfaerber, adding yocaml_liquid as an alternative template engine. (yocaml#101)

  • Major improvements to the validation/projection language (and greater rigour in the concept of validation/normalisation) (yocaml#98, yocaml#109, yocaml#115)

  • Greater control over the iteration logic of actions, allowing recursive traversal of file system fragments, among other things (yocaml#111).

  • Last but not least, in this poorly named PR, yocaml#120, we added the possibility for a task to create multiple files and replaced the internal representation of time. Previously, we used integers, but now we have switched to floats, which offer greater precision (and allow CI to correctly execute CRAM tests that generate sites).

In addition, there are bug fixes, usability improvements, and… a drastic improvement in error reporting, which I will explain in the next section!

About the Outreachy

Many of the improvements to YOCaml were made possible thanks to various participants in the Outreachy programme, which led to @Linda_Njau being selected as an intern! Her work is divided into two specific areas:

  • Drastically improve YOCaml error reporting : yocaml#113, yocaml#114, yocaml#116. Before these patches, YOCaml errors were extremely difficult to diagnose. Since @Linda_Njau took care of them, they are now easier to read, provide context (which file failed to create, and which file was being read), and are displayed in the preview server, so you don’t have to go and read the terminal!

  • The second part of her internship involves working on yocaml-codex, a project currently under development that aims to provide a standard library of templates for building websites faster with YOCaml and sharing the various templates that have been written over the course of the websites developed with YOCaml. Stay tuned!

We are very satisfied (and impressed) with her work, and she has documented her contributions in a blog… freshly designed, with YOCaml, of course: Engineering YOCaml - Pretty Errors; A YOCaml Format Fix

About the tutorial

The tutorial is progressing slowly but surely, and we have notably added a section that describes how to validate/project data to work with most description languages (such as Yaml, ToML, etc.) and most template engines (Jingoo, Mustache, Liquid) : Your Own Data Model

We also took the opportunity to clarify the use of file paths and document the resolver technique!

We will continue to write sections and document the use of YOCaml, so if you have any suggestions, comments, or requests, please send them to us!

Closing words

In September last year, I gave a very clumsy (so French) presentation of YOCaml at Fun OCaml which presents YOCaml’s design choices!

YOCaml is becoming increasingly usable thanks to the contributions of many people! Thank you. If you want to create a static blog/website in OCaml, YOCaml is one of many fun options!

:two_hump_camel: Happy hacking and blogging :two_hump_camel:

11 Likes