Legend:
Library
Module
Module type
Parameter
Class
Class type
Archetypes are pre-designed, validatable and injectable models for rapid blog bootstrapping. However, as Yocaml is very generic... it's worth using it as an example rather than a concrete model.
Components
Archetypes are fairly independent and can be used by customized models. We'll refer to them as components, because they can provide quick solutions for ambitious models.
Describes a date associated with a time. The "default" date format is yyyy-mm-dd HH:mm-ss. In addition to describing data as injectable or readable, the module provides a naive date processing API that seems to be useful for describing a blog.
Models
A template is an archetype richer that can be used to construct, out of the box behavior such as pages or articles. And allows you to bootstrap quickly a blog-engine (as generic as possible).
The models are based on an object interface (hidden from the user) to enable easy composition.
A page is an archetype that naturally maps an HTML page, providing the necessary metadata to fill in the HTML-metadata (<meta ...>) and data to describe the various html tags (<title> and co). A page, which is often the basis of a compilation artifact, is also often associated with another archetype. For example, an Article is a page with additional fields.
An article is a specialization of a page to describe blog posts (associated with a title, synopsis and date). It's the minimal archetype for describing a blog post.
Transforms a regular page into an article index. Useful for building an index (or archive page). The page is read as a regular page which must be injected with a list of string * Article.t pairs (where the first element is an identifier which will be used to reconstruct the URL of the article, the way in which the identifier is converted into a URL is left to the user, for example, in the template).