Overview

Neapolitan is a meta-template format. It allows the designer to string together a variety is different template formats in a single document.

A simple example of a .np file:

  author: Abe Lincoln
  date  : 2010-10-10

  --- markdown

  Examples Of Liberty
  ===================

  * Sparticus
  * Emancipation Proclimation
  * Neapolitan

  --- textile

  h1. Table of Freedom

  | political  | billd of rights |
  | templating | neapolitan |

The top portion of any Neapolitan document is the YAML front-matter, a set of document properties. Each subsequent section is started via three dashes ('---') flush to the left margin followed and by the section's type. In this example, we have a Textile formated section following a Markdown section, presumably because Markdown lacks support for tables.

A section can have more than one type if they are compatible. The Neapolitan parser simply passes the section contents thru each underlying engine in turn.

  date : 2010-10-10

  --- erb rdoc

  = Example

  Blah blah blah...

  Wirtten on <%= date %>.

To learn more about rendering Neapolitan templates, have a look at the QED and API documentation.

Copyright & License

Neapolitan is Copyright © 2009 Rubyworks

It is distributed under the terms of the BSD-2-Clause license.

THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.