These extensions process content, i.e. they either convert data from one format to another or make other changes to the data. Content processors are used, for example, in the transformation pipeline of page and template paths.
It is not specified how content processors have to process the content, they are free to do
anything, even binary transformations (e.g. creating a thumbnail from a picture). Each content
processor is identified by one or more short names (used, for example, in the
pipeline option of
a block in a path in Webgen Page Format) which are listed on the documentation page of a content
Information about how to create a content processor is found in the Webgen::ContentProcessor API documentation.
Content processors can be divided into several groups which are shown below.
Special purpose processors
These processors perform very useful tasks which are nearly always used in the transformation pipeline of page/template paths.
- Replaces a special xml tag with the rendered block of a node in Webgen Page Format
- Provides a very easy way for adding dynamic content
- Generates fragment nodes from all HTML headers which have an id attribute set
These processors convert markup text that is easy to read and write to a more structured format like HTML. This allows you to write an HTML page without knowing HTML.
- Fast superset-of-Markdown to HTML converter
- Converts content written in a superset of Markdown to HTML
- Converts content written in Markdown to HTML
- Converts content written in RDoc markup to HTML
- Converts content written in Textile markup to HTML
These processors are used to add dynamic parts to the processed content.
- Allows one to programatically create valid XHTML/XML documents
- Allows one to use ERB (embedded Ruby) in the content
- Allows one to use ERB (embedded Ruby) in the content (faster than the erb processor)
- Allows one to write HTML with the Haml markup language
- Generate arbitrary output using plain Ruby
These processors allow you to write CSS files in an easier way, for example, they allow the usage of variables to avoid spreading the same data over the whole file.
- Converts content written in the Sass meta language to valid CSS
- Converts content written in the Sassy CSS language to valid CSS
These processors are used to post-process HTML files.
- Compresses CSS files
- Uses the tidy program to convert the content into valid (X)HTML
- Uses the xmllint program to check the content for well-formedness and/or validness
These processors don’t fit into any of the above categories.
- Converts the content (LaTeX TikZ picture commands) into an image