Module Yocaml.Metadata

Data structures attachable to articles/documents.

Adding metadata that could be added dynamically to a template, during the generation of a page for example, is a step forward in the ergonomics of the blog! And yes, it avoids having to define a template per article.

Metadata description

Minimum interfaces for describing metadata sets.

Injectable metadata

Describes a data set that can be injected, for example into a template.

module type INJECTABLE = sig ... end
module type RENDERABLE = sig ... end

Inject Injectable data into a String using a templating strategy.

Readable metadata

A document can be decorated with metadata that can be read and validated.

module type VALIDABLE = sig ... end

Describes how to transform and validate strings into structured objects. An example of a Validable is the Yocaml_yaml module.

module type READABLE = sig ... end

Describes how to transform data processed by the Validable into a concrete type using validation functions from VALIDABLE.

Utility

A collection of public features for building metadata sets.

Date

A rather naive representation of dates.

module Date : sig ... end

Metadata description

Example of a metadata set. These examples are directly usable but you should write your own!

A single page

This collection of metadata describes a single page, characterised by a title and a description. Both parameters are optional.

module Page : sig ... end

An Article

This collection of metadata describes an article, characterised by a title and a description (optional like for single page). And article-related metadata: article_title, article_description, tags and date.

module Article : sig ... end

A page with a list of article

module Articles : sig ... end