To build Stog, you will need:
You will need to have the following tools installed to use some functions:
The easiest way to install on a Debian system is as follows:
$ 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
$ 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:
stog:archived-elts to indicate the types of elements appearing
in archive tree,latex-svg-scale
(default is 1.1) if defined in the environment when producing .svg files.
stog:foo,page.tmpl, elt-in-list.tmpl,
by-keyword.tmpl, by-topic.tmpl, keyword.tmpl,
topic.tmpl, by-month.tmpl.
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.
For information you can see the source code of the page.
<page title="Installation" navbar-install="active" > <prepare-toc depth="2"> <toc></toc> <section id="deps" title="Dependencies"> <p> To build Stog, you will need: </p> <ul> <li><ext-a href="http://caml.inria.fr/">OCaml >= 4.00.1</ext-a> installed,</li> <li><ext-a href="http://config-file.forge.ocamlcore.org/">Config-file >= 1.1</ext-a>.</li> <li><ext-a href="http://erratique.ch/software/xmlm">Xmlm >= 1.1.0</ext-a>,</li> <li><ext-a href="http://projects.camlcity.org/projects/ocamlnet.html">OCamlnet >= 3.6</ext-a>.</li> <li><ext-a href="http://zoggy.github.com/ocamlrss/">OCaml-RSS >= 2.1.0</ext-a>,</li> <li><ext-a href="https://github.com/zoggy/xtmpl">Xtmpl >= 0.5</ext-a>.</li> </ul> <p> You will need to have the following tools installed to use some functions: </p> <ul> <li><ext-a href="http://www.andre-simon.de/doku/highlight/en/highlight.html">highlight</ext-a> to use syntax highlighting,</li> <li>LaTeX and <ext-a href="http://dvisvgm.sourceforge.net/">dvisvgm</ext-a> to embed LaTeX in your pages.</li> </ul> </section> <section id="quickdebian" title="Quick install on Debian"> <p> The easiest way to install on a Debian system is as follows: </p> <ol> <li>Install <ext-a href="http://opam.ocamlpro.com">OPAM</ext-a>, the OCaml package manager, running the following command with root privileges: <command-line> $ 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 </command-line> </li> <li>As a regular user, fetch and install an OCaml version and install Stog. The whole can be done with the following opam commands: <command-line> $ opam init --comp=4.00.1 $ opam update $ opam install stog </command-line> </li> </ol> </section> <section id="download" title="From the sources"> <p>Get the sources from git repository:</p> <command-line>git clone https://github.com/zoggy/stog.git</command-line> <p>Or pick one of the releases:</p> <ul> <li><a href="stog-0.8.0.tar.gz">0.8.0</a> [2013-03-19]: <inc href="release-0.8.0#changes" id="changes0.8.0"/> </li> <li><a href="stog-0.7.0.tar.gz">0.7.0</a> [2013-02-13]: <inc href="release-0.7.0#changes"/> </li> <li><a href="stog-0.6.1.tar.gz">0.6.1</a> [2013-01-17]: Fix version number META file and remove Pcre useless dependency in Makefile and META.</li> <li><a href="stog-0.6.tar.gz">0.6</a> [2013-01-16]: <ul> <li>mod: do not write the config file if it already exists,</li> <li>add: <icode><elements></icode> node handles <icode>reverse="false"</icode> attribute not to reverse order of elements (which is default, i.e. the more recent first),</li> <li>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),</li> <li>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 <a href="ref-doc/Stog_plug.html#VALadd_dep"><icode>Stog_plug.add_dep</icode></a>,</li> <li>add: <icode><include></icode> now handles a <icode>depend="false"</icode> attribute, to prevent adding a dependency of the element on the included file,</li> <li>add: <icode>--depcut</icode> 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.</li> </ul> </li> <li><a href="stog-0.5.tar.gz">0.5</a> [2012-12-18]: <ul> <li>minor fixes (thanks to Gabriel Scherer),</li> <li>better error and warning messages (thanks to Gabriel Scherer),</li> <li>handle prefix in all xml nodes and attributes (upgrade to Xtmpl 0.5),</li> <li>global definitions now are of the form <code>stog:foo</code>,</li> <li>add: module system (not yet stable),</li> <li>add: new <a href="ref-doc/Stog_cache.html">caching system</a>, available for plugins too,</li> <li>add: <a href="ref-doc/Stog_plug.html#VALplugin_config_file">Stog_plug.plugin_config_file</a>,</li> <li>add: <a href="ref-doc/Stog_plug.html#VALregister_level_fun_on_elt_list">Stog_plug.register_level_fun_on_elt_list</a> to register functions handling all elements at a time.</li> <li>fix: add '.' after counters in section title,</li> <li>add: when a basic template is missing, create one and issue a warning; these templates are: <code>page.tmpl</code>, <code>elt-in-list.tmpl</code>, <code>by-keyword.tmpl</code>, <code>by-topic.tmpl</code>, <code>keyword.tmpl</code>, <code>topic.tmpl</code>, <code>by-month.tmpl</code>. </li> </ul> </li> <li><a href="stog-0.4.tar.gz">0.4</a> [2012-11-21]: <ul> <li>handle relative paths in <icode><include></icode>, when starting with <icode>.</icode> or <icode>..</icode>,</li> <li>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 <elt href="ocaml-sessions">here</elt>,</li> <li>add simple cache system, and option <icode>--nocache</icode>,</li> <li>new <icode><inc></icode> rule to include a block from another element: <icode lang="xml"><inc elt-hid="/install" id="blockid"/></icode>, </li> <li>ability to define "functions", site-wide or element-wide,</li> <li>handle blocks and counters,</li> <li>sectionning now uses blocks and counters,</li> <li>a "sectionning" attribute is used to determine which nodes are used for sectionning an element; default is "section,subsection",</li> <li>verify references to blocks by id (sections, ...) and use their title in links,</li> <li>use "id" attribute instead of "name" attribute in sectionning tags,</li> <li>define and use levels of rules; plugins can extend the number of levels to define their own rewriting system.</li> </ul> </li> <li><a href="stog-0.3.tar.gz">0.3</a> [2012-08-30]: <ul> <li>new stage 0 to allow plugins to change the stog structure before generating,</li> <li>new fields <icode>elt_xml_doctype</icode>, <icode>elt_out</icode> in <a href="<site-url/>/ref-doc/Stog_types.html#TYPEelt"><icode>elt type</icode></a>,</li> <li>handle doctype attribute in element description,</li> <li>define and use stage1 and stage 2 functions for plugins,</li> <li>more .mlis file and comments in the library.</li> </ul> </li> <li><a href="stog-0.2.tar.gz">0.2</a> [2012-08-28]: Change the format of files, now all in XML. Config and templates are in <icode>.stog</icode> directory. Less templates required. User can define elements of any "type" (post, page, ...). </li> <li><a href="stog-0.1.tar.gz">0.1</a> [2012-06-20]: Initial release.</li> </ul> <subsection id="compilation" title="Compilation"> <p> Just type </p> <command-line>make && make install</command-line> <p> This will install <icode>stog</icode>, <icode>stog.byte</icode> and <icode>stog-ocaml-session</icode> in the same directory as <icode>ocamlc</icode>. This will also install the <icode>stog</icode> library and the <icode>stog.disqus</icode> and <icode>stog.markdown</icode> plugins, with findlib. </p> </subsection> </section> </prepare-toc> </page>