Canopy - an irmin-powered community blog

Written by Engil (Enguerrand Decorne)
Published: 2016-08-24 (last updated: 2017-05-19)

Description (from PioneerProjects wiki page)

Static websites are sufficient for most of our needs as they are lightweight, easy to deploy/maintain and trivial to compile into unikernels. Jekyll is one example of a static site generator (made popular by GitHub pages) and it would be extremely useful to have similar generator in OCaml. Such a generator would come with sensible defaults such that creating a site would be quick (cf. Jekyll-Bootstrap) and allow blog posts and pages to be written in Markdown. It would also make it easy for anyone who maintains OPAM packages to build pages that represent their libraries without much additional effort. The goal would be to achieve something as simple to set up and run as Jekyll. It's likely that this project would involve the creation of different libraries to deal with different aspects of the work and a number of libraries already exist. The specific approach can be discussed with those interested in this project and the difficulty arises from getting the design correct, rather than just the writing of code. Use-cases for this tool (once it exists) would be for personal websites, project websites and the components would be useful for more substantive sites like or MirageOS.

Just some random thoughts about the current state of Canopy

  • The current Canopy runs under Xen, and in fact the current is a unikernel. Thanks to @mato for building and hosting :)

  • There is some kind of problem with the latest version of Decompress, so Canopy is kind of at risk of crashing anytime someone try to push something else than plain text into the data repository. Be careful with that. :-) (Fixes are on the way thanks to dinosaure)

  • Dates are handled according to the last time a file was updated (and this function is really poorly implemented by myself, it should be rewritten at some point), maybe the date the file was created is a better idea ?

  • Tags are here! They allow content to be classified and searched, via a page like /tags/keyword . If anyone have a better idea it would be awesome. :)

  • Canopy still doesn't do anything with git branches: This would be a nice possibility to use them in some sort. One idea was using them for drafts: it would be possible to query a page using some sort of parameter (like for example /Posts/Nocamlp4?branch=draft) that displays the content of this branch instead. Some discussions about this would be nice.

  • Needs some improving on caching: Currently using some kind of caching with an hashtable updated each time the repository pull new content. Also, all static assets are re-sent everytime, needs to add some headers somewhere.

  • The code need some more documentation, and maybe needs to be a little simpler to modify and extend to satisfy integration needs (for example, making the html templates more modular and easy to change.).