package doc-ock-html

  1. Overview
  2. Docs
type t = private {
  1. name : string;
  2. content : [ `Html ] Tyxml.Html.elt;
  3. children : t list;
}
val traverse : f:(parents:string list -> string -> [ `Html ] Tyxml.Html.elt -> unit) -> t -> unit
type kind = [
  1. | `Arg
  2. | `Mod
  3. | `Mty
  4. | `Class
  5. | `Cty
]

These two functions are used to track the depth while building the tree, which is needed to produce correct links.

val enter : ?kind:kind -> string -> unit
val leave : unit -> unit

Page creator

class page_creator : ?kind:kind -> path:string list -> Html_types.div_content_fun Tyxml.Html.elt list -> object ... end
val set_page_creator : (?kind:kind -> path:string list -> Html_types.div_content_fun Tyxml.Html.elt list -> page_creator) -> unit
val make : (Html_types.div_content_fun Tyxml.Html.elt list * t list) -> t

make (body, children) calls "the page creator" to turn body into an [ `Html ] elt. If set_page_creator was not called, a default creator is used.

val render_fragment : (_, _, DocOck.Paths.Fragment.sort) DocOck.Paths.Fragment.raw -> string
val open_details : bool Pervasives.ref

Whether <details> tags should be opened by default or not. Default is true.

OCaml

Innovation. Community. Security.