Project structure

If you look into the directory generated by stone by default, you'll have:

├── config.stone
├── data
│   ├── style.css
│   └── template.html
└── pages
    └── index.md

After running stone, the static pages are generated in a new directory :

└── site
    ├── index.html
    └── static
        └── style.css

The site directory contains the generated content: what you want to send online to be served by your web server.


Pages content is processed by exporters, to obtain from some syntax the html code to insert in a template.

By default, a built-in markdown exporter is provided, which handle files with extensions .md and .markdown. Consequently, you can write pages in markdown out of the box. If you don't know the markdown syntax yet, you can have a look at its specification or at a recap.

You can also specify custom exporters, that may override the built-in one(s), using the Exporters variable of the config.stone file. An exporter is stored as a couple of the extension of the files to handle, and an external command to convert pages to html. There are more details in the default config.stone.

If, for a given file in the pages directory, no exporter is found, it is copied as is.


After being processed by an exporter, the content of a page is inserted into a template. The default template is template.html, as indicated by the DefaultTemplate variable of the config.stone.

You can also specify custom templates: the PagesTemplates variable (in config.stone) specify a list of custom templates, composed by a couple of a regexp that matches the files that must use the template, and the filename of the template itself. There are more details in the default config.stone.

Writing custom templates

Stone templates are just plain html pages, with some magic variables that will be replaced during the pages generation.

The variables you can use are the following:

When inserting a variable in your template, you must surrond it by '$'s: if the var is VAR, the string $VAR$ must be inserted in the template.

Generated pages properties