Home » Projekte » Webber » Configuration

Configuration

Configuration happens either via Command line options or with the configuration file (described below). All configurations are subject to Configuration inheritance. You can also overwrite any of them on a per-directory and/or per-file basis.

Config file format 

Webber expects file named "webber.conf" file in the root directory. It could look like this:

template: "default"
date_format: "%d.%m.%Y"
plugins: [
    "skeleton",
    "hierarchy",
    "link",
    "read_rst",
    "read_html",
    "read_copyonly",
    "read_markdown",
    "template_mako",
    "my_plugin",
    ]
plugin_dirs: [
    "my_plugins"
    ]

Options for the Command line options can also be specified in the config file:

in_dir: "in"
out_dir: "out"
style_dir: "in/style"
verbose: 5

Webber's configuration 

in_dir 

Directory, where the source files (in markdown, rst or html format) reside.

Default: "in".

See Command line options.

out_dir 

Directory where webber creates the output files.

Default: "out".

See Command line options.

style_dir 

Directory where webber reads the Mako templates.

Default: "in/style".

See Command line options and "template".

template 

Used by Mako templates to select the template.

Default: "template"

input_encoding 

Encoding (e.g. 'utf-8', 'iso-8859-1' etc) used when reading source pages.

Default: "iso-8859-1"

output_encoding 

Encoding (e.g. 'utf-8', 'iso-8859-1' etc) used when writing the final HTML pages.

Default: "iso-8859-1"

plugins 

List of Plugins to load.

plugin_dirs 

List of directories that should be search for Plugins. Can be empty or completely omitted.

exclude_dirs 

List of directories below "in_dir" to skip.

Default: "[]"

exclude_files 

List of files below "in_dir" to skip.

Default: "['webber.conf', 'directory.conf', '*.tmpl']"

date_format 

Used in format_date(). The format is the same as in "man 2 strftime".

verbose 

How verbose webber should be.

See Command line options.

keep_going 

If webber should continue after an error.

See Command line options.

Plugin's configuration 

Many Plugins can use custom options. Read more about them in their documentation.

User defined configuration 

Beside those entries, you can specify any additional entries that will then be available in user-defined Plugins, Functions, Macros or Mako templates. For example, after adding:

category: "Webber"

you can access in Mako templates with:

<p>Category: ${page.category}</p>

Recently changed in this area: