package stog

  1. Overview
  2. Docs

Module Stog.TmplSource

Default templates.

Sourceval 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 Error.Template_file_not_found

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

Sourceval 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.

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

Innovation. Community. Security.