To build Stog, you will need:

  • OCaml >= 4.00.1 installed,
  • Config-file >= 1.1.
  • Xmlm >= 1.1.0,
  • OCamlnet >= 3.6.
  • OCaml-RSS >= 2.1.0,
  • Xtmpl >= 0.5.

You will need to have the following tools installed to use some functions:

  • highlight to use syntax highlighting,
  • LaTeX and dvisvgm to embed LaTeX in your pages.

The easiest way to install on a Debian system is as follows:

  1. Install OPAM, the OCaml package manager, running the following command with root privileges: $ echo "deb [arch=amd64] http://www.recoil.org/~avsm/ wheezy main" >> /etc/apt/sources.list $ apt-get update $ apt-get install opam autotools-dev m4
  2. As a regular user, fetch and install an OCaml version and install Stog. The whole can be done with the following opam commands: $ opam init --comp=4.00.1 $ opam update $ opam install stog

Get the sources from git repository: git clone https://github.com/zoggy/stog.git

Or pick one of the releases:

  • 0.8.0 [2013-03-19]:
  • 0.7.0 [2013-02-13]:
  • 0.6.1 [2013-01-17]: Fix version number META file and remove Pcre useless dependency in Makefile and META.
  • 0.6 [2013-01-16]:
    • mod: do not write the config file if it already exists,
    • add: <elements> node handles reverse="false" attribute not to reverse order of elements (which is default, i.e. the more recent first),
    • mod: better cache system, using dependencies of each element on other elements and files; also handles the stog environment used to compute elements in cache, so that a change in the stog environment will make all elements recomputed (for example when language changes),
    • add: a rule using a file or another element must add a dependency from the computed element to the element or file it depends on, using Stog_plug.add_dep,
    • add: <include> now handles a depend="false" attribute, to prevent adding a dependency of the element on the included file,
    • add: --depcut option, used when getting cached elements, to use only one level of dependency between elements; this is useful for example in case the site has a menubar, leading to having almost all elements depending on almost all elements.
  • 0.5 [2012-12-18]:
    • minor fixes (thanks to Gabriel Scherer),
    • better error and warning messages (thanks to Gabriel Scherer),
    • handle prefix in all xml nodes and attributes (upgrade to Xtmpl 0.5),
    • global definitions now are of the form stog:foo,
    • add: module system (not yet stable),
    • add: new caching system, available for plugins too,
    • add: Stog_plug.plugin_config_file,
    • add: Stog_plug.register_level_fun_on_elt_list to register functions handling all elements at a time.
    • fix: add '.' after counters in section title,
    • add: when a basic template is missing, create one and issue a warning; these templates are: page.tmpl, elt-in-list.tmpl, by-keyword.tmpl, by-topic.tmpl, keyword.tmpl, topic.tmpl, by-month.tmpl.
  • 0.4 [2012-11-21]:
    • handle relative paths in <include>, when starting with . or ..,
    • use a separate tool to evaluate ocaml code, "stog-ocaml-session"; this allows to use native code version of stog even when evaluating ocaml code; it also makes possible to use distinct ocaml toplevels in ocaml-eval (with session="..."); details here,
    • add simple cache system, and option --nocache,
    • new <inc> rule to include a block from another element: <inc elt-hid="/install" id="blockid"/>,
    • ability to define "functions", site-wide or element-wide,
    • handle blocks and counters,
    • sectionning now uses blocks and counters,
    • a "sectionning" attribute is used to determine which nodes are used for sectionning an element; default is "section,subsection",
    • verify references to blocks by id (sections, ...) and use their title in links,
    • use "id" attribute instead of "name" attribute in sectionning tags,
    • define and use levels of rules; plugins can extend the number of levels to define their own rewriting system.
  • 0.3 [2012-08-30]:
    • new stage 0 to allow plugins to change the stog structure before generating,
    • new fields elt_xml_doctype, elt_out in elt type,
    • handle doctype attribute in element description,
    • define and use stage1 and stage 2 functions for plugins,
    • more .mlis file and comments in the library.
  • 0.2 [2012-08-28]: Change the format of files, now all in XML. Config and templates are in .stog directory. Less templates required. User can define elements of any "type" (post, page, ...).
  • 0.1 [2012-06-20]: Initial release.

Just type make && make install This will install stog, stog.byte and stog-ocaml-session in the same directory as ocamlc. This will also install the stog library and the stog.disqus and stog.markdown plugins, with findlib.