GithubHelp home page GithubHelp logo

byxorna / poet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jsantell/poet

0.0 3.0 0.0 473 KB

A node.js blog engine

Home Page: jsantell.github.com/poet

License: MIT License

JavaScript 100.00%

poet's Introduction

Poet

Build Status

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 http://jsantell.github.com/poet

Poet In Action

These sites are using Poet for their blogging, check them out! Ping me, or send a PR if you too are using Poet in the wild.

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')( app );

poet.set({
  posts: './_posts/',
  postsPerPage: 5,
  metaFormat: 'json'
})
  .createPostRoute()
  .createPageRoute()
  .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 page route
  • readMore A function taking the post object as the only parameter, returning a string that is appended to the post's preview value. By default will be a function returning <a href="{post.link}">{post.title}</a>

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.

poet's People

Contributors

jsantell avatar guifromrio avatar

Watchers

Gabe Conradi avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.