Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Wheat is a blog engine for coders written in node.JS
tree: 9f5452445b

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
LICENSE
README.markdown
package.json

README.markdown

Wheat

Wheat is a blogging engine that reads a git repo full of markdown articles and presents them as a website.

Wheat engine takes a local git repository path as a parameter

var wheat = require('wheat')("/path/to/my/repo");
// wheat is now a function which handles request and return response:
// wheat(req/*request*/, res/*response*/, next /*next handler to call for this request*/)

Here's an example using Connect ( npm install connect ) to start a server, adapted from howtonode.org repo app.js :

var Connect = require('connect'); 

var repository = "/path/to/my/repo";

Connect.createServer(
    Connect.logger(),
    Connect.conditionalGet(),
    Connect.favicon(),
    Connect.cache(),
    Connect.gzip(),
    require('wheat')(repository)
    ).listen(3000);

How to Install

Either manually install all the dependencies or use npm.

npm install wheat

For on the fly rendering of Graphviz graphs (DOT files), Graphviz will need to be installed

Full example of how to use wheat, using howtonode.org repository for skin/articles/... :

$> npm install wheat
$> git clone https://github.com/creationix/howtonode.org.git
$> cd howtonode.org

Then edit app.js and add ".listen(3000);" at the end of "Connect.createServer", see above example using connect.

Now just run it, and open your browser on your host, port 3000

$> node app.js

That's it!

Something went wrong with that request. Please try again.