module Stog_html: sig
.. end
Base module.
val doc_by_href : ?typ:string ->
?src_doc:Stog_types.doc ->
Stog_types.stog ->
'a ->
'a Xtmpl.env ->
string -> 'a * (Stog_types.doc * string * string option) option
doc_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.
src_doc
: can be used to specify the source document, to improve
the error message.
val get_in_env : 'a -> 'a Xtmpl.env -> Xmlm.name -> 'a * Xtmpl.tree list
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.
val get_path : 'a -> 'a Xtmpl.env -> 'a * Stog_path.path
get_path env
returns the path associated to "path"
in env
.
Raises Assert_failure
if "path"
is not found in the environment.
val escape_html : string -> string
Escape html code in the given string: change &
to &
,
<
to <
and >
to >
.
val concat_name : ?sep:string -> string * string -> string
val url_of_path : Stog_types.stog -> Stog_path.path -> Neturl.url
Build an url from the given path.
This is used for documents created on the fly, like by-word or by-month index.
val build_base_rules : Stog_types.stog ->
Stog_types.doc_id -> (Xmlm.name * Stog_types.stog Xtmpl.callback) list
Build the base rules, using the default ones and the base rules register
by plugins.
val doc_list : Stog_types.doc ->
?rss:Neturl.url ->
?set:Stog_types.Doc_set.t -> Stog_types.stog Xtmpl.callback
The calllback to insert a list of documents. Can be called directly
if provided an additional environment, argument and children nodes.
val get_sectionning_tags : Stog_types.stog -> Stog_types.doc -> Xtmpl.name list
val mk_levels : string ->
(string * 'a Stog_engine.level_fun) list ->
int list Stog_types.Str_map.t ->
?levels:(string * int list) list ->
unit -> 'a Stog_engine.level_fun Stog_types.Int_map.t
mk_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, Stog_engine.level_fun)
and default_levels
is the default list of associations between funnames and levels.
val make_module : ?levels:(string * int list) list -> unit -> (module Stog_engine.Module)
val module_name : string
val register_base_rule : Xtmpl.name -> Stog_types.stog Xtmpl.callback -> unit