package stog

  1. Overview
  2. Docs

Module Stog.PlugSource

Interface for plugins.

Even if all modules are accessible from dynamically loaded code, this Plug module should remain compatible from one release to another.

Sourcemodule Xml = Xtmpl.Xml
Sourceval plugin_config_file : Types.stog -> string -> string

plugin_config_file stog plugin_name returns the configuration file for this plugin name, for consistency purpose.

Sourceval register_lang : Intl.lang_abbrev -> Intl.lang_data -> unit
Sourceval register_html_base_rule : Xml.name -> Types.stog XR.callback -> unit

register_html_base_rule name f registers a new function associated to name in the set of base rules of the "html" predefined module.

Sourceval doc_by_href : ?typ:string -> ?src_doc:Types.doc -> Types.stog -> 'a -> 'a XR.env -> ?loc:Xml.loc -> string -> 'a * (Types.doc * string * string option) option

doc_by_href ?typ ?src_doc stog env href returns the document, path and optional if matching the given href string, of the form path[#id]. Return None if the document could not be found, of the id could not be found, and an error is issued.

  • parameter src_doc

    can be used to specify the source document, to improve the error message.

Sourceval mk_block_node : id:string -> ?label:XR.tree list -> ?clas:string -> title:XR.tree list -> ?counter:string -> short_fmt:XR.tree list -> long_fmt:XR.tree list -> XR.tree list -> XR.tree

mk_block_node ... creates a <block ... with the given information.

Dependencies

For a given document, add a dependency on a file or another document.

OCaml

Innovation. Community. Security.