package stog

  1. Overview
  2. Docs

Default templates.

type contents = Types.stog -> Types.stog * Xtmpl.Rewrite.tree list
val get_template_file : Types.stog -> Types.doc -> ?loc:Xtmpl.Xml.loc -> string -> string

get_template_file stog doc file returns absolute filename of the given template filename. If file is relative and implicit then the file is looked up the stog include directories. If file is relative and not implicit (i.e. it starts with . or ..), it is concatenated to the document source file directory. Else (the filename is absolute), it is returned as is.

  • raises Template_file_not_found

    if no include directory contains the given file (when the file is relative an implicit).

val read_template_file : Types.stog -> Types.doc -> ?depend:bool -> ?raw:bool -> ?loc:Xtmpl.Xml.loc -> string -> Types.stog * Xtmpl.Rewrite.tree list

read_template_file stog doc file returns the content of the given template filename, after calling get_template_file to get the final filename.

  • parameter raw

    indicate whether to read the template as XML (false) or as CData (true). Default is false.

  • parameter depend

    indicate whether to add a dependency from the document on the file. Default is true.

val get_template : Types.stog -> ?doc:Types.doc -> contents -> string -> Types.stog * Xtmpl.Rewrite.tree list
val get_template_doc : Types.stog -> ?doc:Types.doc -> contents -> string -> Types.stog * Xtmpl.Rewrite.tree Xtmpl.Xml.doc
val page : contents
val by_keyword : contents
val by_topic : contents
val by_month : contents
val doc_in_list : contents
val keyword : contents
val topic : contents
val rss : contents
val rss_item : contents
val doc_list : contents
OCaml

Innovation. Community. Security.