/Projects/PyCo/Renderers/Blog

The blog renderer allows to display a list of blog entries on a page.

Each entry consist of some meta information, a renderer and a path to a file with the content of the entries. This information is stored in the blog page itself using a simple JSON format.

The only blog-wide configuration available is the base path for the entries. All other information is stored per blog entry. The following example shows the content of a simple blog page:

#! blog
{
  "path" : "/blog",
  
  "posts" : [
    {
      "title"    : "Jump to Line",
      "date"     : "2011-09-15",
      "author"    : "fooker",
      "renderer" : "creole",
      "file"     : "jump_to_line"
    },
    {
      "title"    : "A Blog for PyCo",
      "date"     : "2011-09-15",
      "author"    : "fooker",
      "renderer" : "creole",
      "file"     : "a_blog_for_pyco"
    }
  ]
}

For the overall configuration, the path attribute configures the base path of all entries in the blog in relation to the base path of the PyCo installation.

The title attribute contains the title as displayed on the page.

The date attribute contains the date of the creation of the article.

The autor attribute contains the (nic-) name of the author of the entry.

The renderer attribute contains the name of a renderer. The naming rule is identical to the rule for the she-bang.

The file attribute is the file name of the file containing the entry content. The content must not begin with a she-bang, as the renderer is already defined.