The Atomizer extension takes an array of blog posts, and generates an Atom feed at the specified location.

Usage

Feed items

Items fed to the Atomizer extension must meed some criteria in terms of properties returning data:

Property Description
title Title of the entry
date Date of the entry
author Either a simple string, or an object providing name and email properties
content The full content of the entry (HTML is allowed)

Parameters

Awestruct::Extensions::Atomizer.new(var_name, output_path, opts)

Parameter Description
var_name Name of property on `site` to act as a source of posts, typically an array
output_path /extensions/atomizer/usage.html
opts Options for title, content url and generated entries

Options

content_url URL used to set the `id` element in the atom feed - you might want to use your actual blog URL like `http://example.com/blog`. Defaults to `site.base_url`.
feed_title Feed title. Defaults to`site.title` or if unset `site.base_url`
num_entries Number of most recent entries rendered in the atom feed. Defaults to 50.

Examples

Generic Installation

Awestruct::Extensions::Pipeline.new do
  extension Awestruct::Extensions::Atomizer.new(var_name, output_path, opts)
end

Typical Usage

Awestruct::Extensions::Pipeline.new do
  extension Awestruct::Extensions::Atomizer.new( 
    :posts, 
    '/news.atom',
    :feed_title=>'Awesome Blog Inc.' 
  )
end

See Also