Writing in HTMLText

Writing PubTal content using HTMLText.

To write PubTal content in the HTMLText format all you need is a text editor.  The file format is very simple: headers are written at the start of the file, followed by a blank line, and then the page body.

Headers

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 (even when no headers are used).

An example of some headers:

title: This is a test.
description: This test has two test headers.

This is the body of the page.

When PubTal generates the web page for this content file, it will pass the headers to the template.  Headers can also be specified in the configuration file (see Configuration).  If the header in a content file is also in the configuration file, the header in the content file is used.

HTML and XHTML

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.  PubTal tries to ensure that only valid HTML is published and will report as an error any badly nested HTML present in a document.

Template Properties

In addition to the properties listed in the Template Basics section, HTMLText content also generates an additional property: rawContent.

This is available on the page object (i.e. the TAL path is page/rawContent), and holds a copy of the HTMLText content in its unparsed form.

To specify which files are treated as HTMLText please refer to the Configuration section.

Last Modified: Sat, 07 Feb 2015 12:35:15 GMT

Made with PubTal 3.5

Copyright 2017 Colin Stewart

Email: colin at owlfish.com