Legend:
Library
Module
Module type
Parameter
Class
Class type
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).
Type
type t
A type describing a list of articles.
Unlike the previous archetypes, reading an index consists of reading a regular page, so this module does not implement the DATA_READABLE interface. However, it is possible to inject it. The classic workflow consists of reading the page's metadata. Constructing the list of articles to be displayed in the index, converting the page into an article and then applying the corresponding template cascade.
sort_by_date ?increasing articles sorts items by date, if the increasing flag is set to true, items will be ordered from oldest to newest. Otherwise, they will be sorted from newest to oldest. By default, the flag is set to false.
A helper task that transforms a directory path into a list of items, useful for building indexes. You can refer to the examples to see how this is used in a classic pipeline.