Legend:
Library
Module
Module type
Parameter
Class
Class type
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.
Type
type t
A type describing a page with associated fields:
page_title an optional title
page_charset an optional page charset
description an optional page description
tags an optional list of tags
display_toc an optional flag to displaying the table of contents or not
toc an optional representation of the table of contents
The separation between fields prefixed with page_ and those without prefix allows you to distinguish between fields that describe page-specific behavior and those that don't describe generic behavior. For example, an article is also a page, but can be given a different page title.
validate raw_data Validates a data item represented by type Yocaml.Data.t and projects it into a value of type t.
In addition to the page_title, page_charset and page_description fields, normalization returns a meta field that contains a list of name; content records to easily derive a list of metadata based on the page fields.
It also exposes Boolean fields to determine whether a page has a title, description or charset with the parameters has_page_title, has_page_description, has_page_charset and has_page_tags.