Skip to content

fauverism/poet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poet

Poet has your code-blogging back. Renders markdown, jade, or any templated files as posts, tag it up with metadata that's passed into any view engine you want, instant pagination, tag and category views, and home in time for dinner.

View the source for jsantell.com to see an example of Poet in use. Much <3 to Brittany Fedor for the sweet art!

The Node Poet

Documentation

Full documentation for Poet can be found at jsantell.github.com/poet

Installing

  • npm install poet

Setup

Include Poet in your package.json and add it to your app, passing in your Express app and options.

var
  express = require('express'),
  app     = express(),
  poet    = require('poet');

poet( app, {
  posts: './_posts/',
  postsPerPage: 5,
  metaFormat: 'json'
})
  .createPostRoute()
  .createPostListRoute()
  .createTagRoute()
  .createCategoryRoute()
  .init();

Options

  • posts path to directory of your files of posts (default: ./\_posts/)
  • metaFormat format of your front matter on every blog post. Can be yaml or json. (default: json)
  • postsPerPage How many posts are displayed per page in the post list

Posts

Posts are constructed in markdown, jade, or any templated language of your choice (read docs), prefixed by front matter via YAML or JSON. All attributes are stored into the post object.

Development

To run tests, run npm test from the project root to run the Mocha tests.

Releases

No releases published

Packages

No packages published