Config file
All the information used by Dowww is stored in some configuration files.
Config file structure
- blank lines are ignored.
- lines whose the first non blank character is either # or ; are comment lines
and then ignored.
other lines should contain either:
- a keyword, followed by arguments
- an identifier, doted or not, follwed by "=" and some assigned value.
keywords:
Keywords can be lowercase or uppercase, and can appear several times in
the config file(s). The 4 keywords are:
Include
Prefix
Folder
Generate
Prefix
Folder
Generate
Keyword list and definitions:
INCLUDE [path/]filename
The "filename" file will be included where the INCLUDE command is placed.
There is no limit to the number of include files. Included file is a dowww
config file of same format. The current PREFIX (see below) configuration
is not seen by the included file. Path is relative to the Config folder
defined in configuration, or an absolute path. Each file is included only
once, even if its name appears several times in different config files
include command.
PREFIX [xxx]
The prefix value xxx is inserted before each following identifier definition.
Example:
prefix index
title = "Title"
data = "xxx"
This will assign the values to the data names "index.title" and
"index.data". Each PREFIX command replace the precedent one, a PREFIX
command without value will erase previous content.
FOLDER [path/]source [path/]dest
Each FOLDER command declares a source folder to be copied without change
into a destination folder. If needed, the destination folder and path are
created. All files and subdirectories of the source folder are copied.
Source path is relative to the Static folder configured, dest path
is relative to the Web folder configured.
Example:
Folder css css
Folder images img
GENERATE page1 [page2 ...]
The command generate add one or several pages to the list of pages to be
computed. Any number of GENERATE declaration can appear in the main config
file or in included files. The page1, page2, ... names are the alias used
to define the page data.
Example:
generate index
page.index.title = "Title"