PubTal Configuration Options

Documentation of PubTal configuration options.

All configuration is held in a single file, with all directory and file references relative to the directory containing the configuration file. For example, if you have a configuration file new-site/site.config such as:

<SiteConfig>
content-dir src
</SiteConfig>

then the content will reside in the directory new-site/src/.

Several different kinds of configuration options can be set:

Configuration options include the template to be used, macros to be included, and default values for header name-value pairs. Additionally some global options are available such as the location of the content directory and character set used across the site.

<SiteConfig>

If used, this directive must be the first directive in the configuration file. It controls site-wide configuration.

content-dir dir

Sets the location of the content directory to dir. Defaults to "content".

dest-dir dir

Sets the location of the destination directory to dir. Defaults to "dest".

template-dir dir

Sets the location of the template and macro directory to dir. Defaults to "template".

ignore-filter regex

Adds a regular expression to the filter list of files to ignore when looking for content to publish. For example, to ignore CVS and backup files (.txt~), add the lines:
ignore-filter .*?CVS.*
ignore-filter .*~$

character-set encoding

Sets the character set that the HTML templates and content are encoded in. Defaults to ISO8859-15.

<FileType extension>

Sets the default configuration to be used for all files ending in extension. By default, only .txt (HTMLText) and .catalogue (Catalogue) files are configured, but this default option can be overridden.

content-type type

When using the FileType directive, the content-type must be included. The only values recognised at this time are 'HTMLText' and 'Catalogue'.

template templateFile

Set the template (relative to the template directory) that should be used for content with this file type. Defaults to template.html.

macro name templateFile

Adds templateFile to the list of macros that will be available. All macros defined in the templateFile will be available to the template used for content with this file type. Macros are available under the TAL path macros/name/macro-name.

header name value

Adds a default value to the header name. The header can be overridden by the name-value set in the content.

<File contentFile>

Sets the default configuration to be used for a particular file. See Directory directive for details.

<Directory [dir]>

Settings for Directory and File are the same, except that Directory options apply to all content underneath that directory, whereas options specified with File only apply to the one file.

If the dir parameter is missing from the Directory directive, then these options apply to all content, otherwise they apply to content underneath the dir directory. For example, if the content directory is 'new-site/src' then the directive <Directory test> would apply to all content beneath new-site/src/test.

template templateFile

Set the template (relative to the template directory) that should be used for HTMLText content beneath this directory. Can be overridden by either a template option set on a deeper directory, or by the File directive.

macro name templateFile

Adds templateFile to the list of macros that will be available. All macros defined in the templateFile will be available to the template used for content beneath this directory. Can be overridden by either a macro option set on a deeper directory, or by the File directive. Macros are available under the TAL path macros/name/macro-name.

header name value

Adds a default value to the header name. Can be overridden by either a header option set on a deeper directory, or by the File directive. The header can be over-ridden by the name-value set in the content.

catalogue-index-template templateFile

Set the template (relative to the template directory) that should be used for Catalogue master index pages beneath this directory. Can be overridden by either a catalogue-index-template option set on a deeper directory, or by the File directive.

catalogue-item-template templateFile

Set the template (relative to the template directory) that should be used for Catalogue item pages beneath this directory. Can be overridden by either a catalogue-item-template option set on a deeper directory, or by the File directive.

catalogue-max-columns number

Set the maximum number of items to put in a row before starting a new row when populating the catalogue/rows property. Can be overridden by either a catalogue-max-columns option set on a deeper directory, or by the File directive.

catalogue-build-pages [item],[index]

Control whether item, master index pages, or both should be built for catalogue content. Can be overridden by either a catalogue-build-pages option set on a deeper directory, or by the File directive.

PubTal Version 1.1