package stog
Module Stog.HtmlSource
Base module.
val doc_by_href :
?typ:string ->
?src_doc:Types.doc ->
Types.stog ->
'a ->
'a XR.env ->
?loc:Xtmpl.Types.loc ->
string ->
'a * (Types.doc * string * string option) optiondoc_by_href ?typ ?src_doc stog env href returns the document, path and optional id 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.
get_in_env env tag will look for the given string in the environment, by building a <tag/> node and evaluating it. If the result is the same node, then return "" else return the reduced value as a string.
get_path env returns the path associated to "path" in env. Raises Stdlib.Assert_failure if "path" is not found in the environment.
Escape html code in the given string: change & to &, < to < and > to >.
Build an url from the given path. This is used for documents created on the fly, like by-word or by-month index.
Build the base rules, using the default ones and the base rules register by plugins.
The calllback to insert a list of documents. Can be called directly if provided an additional environment, argument and children nodes.
val mk_levels :
string ->
(string * 'a Engine.level_fun) list ->
int list Types.Str_map.t ->
?levels:(string * int list) list ->
unit ->
'a Engine.level_fun Types.Int_map.tmk_levels modname funs default_levels returns a function to create the level map from an optional list of pairs (funname, [level1 ; level2; ...]). funs is a list of pairs (funname, Engine.level_fun) and default_levels is the default list of associations between funnames and levels.