package yocaml

  1. Overview
  2. Docs
Core engine of the YOCaml Static Site Generator

Install

dune-project
 Dependency

Authors

Maintainers

Sources

yocaml-2.0.0.tbz
sha256=fddf61500e828ac88d86ba982084cc817299302082a6e797b36787ff18235ec2
sha512=8b71a8cecd3e101df55eef0bba7a24d4dde9d66b5ecedd9f6d55834fcdc8d33fd875092ca73a398e1715664caee06cdc1bdb1b4da85bff0a687faac5c0445023

doc/yocaml/Yocaml/Markup/Toc/index.html

Module Markup.TocSource

Generic table of contents representation.

Sourcetype 'a t

Type describing an entry tree in a table of contents. The representation of the elements is left to the implementation of plugins.

Sourceval from_list : (int * 'a) list -> 'a t

Builds a table of contents from an indexed list. For example, a list of headings in a Markdown document.

Sourceval to_labelled_list : 'a t -> (int list * 'a) list

to_labelled_list toc converts toc into a list of labelled nodes. Each node is paired with an index represented as a list of integers, which indicates the node’s position in the hierarchical tree structure.

Sourceval to_html : ?ol:bool -> ('a -> string) -> (string * 'a) t -> string option

to_html ?ol label_to_string toc_of_id_and_label from a table of contents build on top of a list of id * label, generate the corresponding HTML.