Skip to main content

Deliverance rewrites HTML to add theming

Project description

Deliverance rewrites HTML pages to theme the pages – adding things like navigation, stylesheets, and applying a common look-and-feel to content from a variety of sources.

Unlike typical templating systems, Deliverance works only on HTML; there’s no variables to substitute or Python structures involved. It takes a simple set of rules and applies these to the HTML, so you can style the output of pages regardless of where the page comes from.

The theme itself is an HTML page with zero code in it. It is simply an example of what a page should look like; this makes it accessible to designers or any kind of tool, and may itself even be dynamically generated. For instance, you might use a blog page as a theme, and wrap that theme around a wiki to give the two a common look and feel.

The rules are written in an XML format, that looks something like:

<rules xmlns:xi="http://www.w3.org/2001/XInclude"
       xmlns="http://www.plone.org/deliverance" >
  <xi:include href="standardrules.xml" />
  <copy theme="//div[@id='container']"
        content="//*[@id='portal-columns']" />
</rules>

This example, in addition to doing the ‘standard’ things (which includes merging the <head> of both pages) also copies the tag <div id="portal-columns"> into the theme page’s <div id="container">.

Deliverance is implemented as both a rendering object and WSGI middleware. Included in the package is a script that uses the WSGI middleware as an HTTP proxy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Deliverance, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size Deliverance-0.2.tar.gz (99.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page