When launched on a given root directory, stog will read all files and directories from this starting point and generate the same hierarchy in the output directory.

Some of the files will be read as , i.e. XML files which will be processed through a templating engine to produce the final files.

Since the document files are handled as XML documents, the boolean attributes, like in HTML5, are not allowed. So, when using Stog to generate HTML5 pages, instead of writing

<tag att1="..." att2="..." boolean-attribute att3="..." ...>...

you have to give a value to the boolean attribute, for example

<tag att1="..." att2="..." boolean-att="boolean-att" att3="..." ...>...

or simply

<tag att1="..." att2="..." boolean-att="" att3="..." ...>...

The .stog directory in the given root directory contains the templates (in directory templates) and the config file, containing stog configuration.

In this file, using regular expressions, one can indicate which files must be ignored, and which files are documents. Files not being ignored nor being documents will be copied by stog to the target directory. The "follow-symlinks" option indicates whether to follow symlinks or not. Default is to ignore symlinks.

Here is an example of .stog/config file:

A default file is generated by stog if it does not exist.

When launched, stog performs the following actions:

  1. Read the given directory hierarchy,
  2. Create the target directory if it does not exist,
  3. Apply the engine on documents,
  4. Generate resulting document files in the target directory,
  5. Copy all other files in the target directory, of course keeping the source directory structure.