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.
Minimum interfaces for describing metadata sets.
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.
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
.
A collection of public features for building metadata sets.
A rather naive representation of dates.
module Date : sig ... end
Example of a metadata set. These examples are directly usable but you should write your own!
This collection of metadata describes a single page, characterised by a title
and a description
. Both parameters are optional.
module Page : sig ... end
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
module Articles : sig ... end