Using different content-types in PubTal.
PubTal supports several different content types, i.e. different ways of writing web page content. Support for additional content types can be added using Plugins.
All content types except Binary have support for name-value pairs, or headers, at the start of the file. An unlimited number of headers can be defined, or none at all. The body of the content must be separated from the headers with a single blank line (including when no headers are used).
An example of some headers:
title: This is a test
description: Two test headers.
This is the body of the page.
The HTMLText content type will have paragraph tags (<p>) and newline tags (<br>) automatically added to it by PubTal. The rest of the markup is written in ordinary HTML, for example <b> tags for bold, and <a> for links.
If the template's output-type is set to 'HTML' then newlines will be replaced with <br> tags. If XHTML is set then <br /> tags will be used instead. It is up to the author of the content to use the correct HTML/XHTML tags in the main content.
The Catalogue content type allows for collections of items (e.g. photos) to be organised with a master index page and individual pages for each item in the collection. Details on how to use the Catalogue content type can be found in the section Using Catalogues.
The raw content type is similar to the HTMLText type, except that no new tags are added to the PubTal output, and so the author must enter all tags manually. For example:
title: Raw content test
<p>This is the first paragraph - note the tags!</p>
<p>And this is the second paragraph.</p>
The Binary content type does a straight copy of the content file to the destination directory, creating any required directories. No parsing of the content file is done and no template is used.
PubTal Version 2.0