Skip to content
file based static website/blog generator --
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


bread is a simple blogging engine for node that uses bake, mongodb and markdown.

So let's see how you can bake your bread in node.


var bread = require("bread");

// configuration object
var conf = {
    dbinf: { // MongoDB connection
        host: "localhost",
        port: "27017",
        name: "mywebsite",
        collection: "pages"

    directories: {
        input: "pub",    // Look for files in this dir.
        output: "pub",   // Write files to this dir.
        templates: "tpl" // Look for templates in this dir.

    fileExtensions: { // Replace markdown by html
        "mkd": "html",
        "md": "html",
        "mdown": "html",
        "markdown": "html"

    // Array of indexes that shall be created
    indexes: [
        // Blog Index
            title: "My Blog",
            pattern: /\/log\/[^\/]+/, // Index files matched by this pattern.
            path: {
                first: "/log/index.html",  // first page of the index
                pattern: "/log/index-{{page}}.html"  // other pages
            template: "index.tpl",    // template
            limit: 8,                 // 8 links per page
            sort: [["date", "desc"]]  // newest first
        // RSS Feed
            title: "My Blog",
            pattern: /\/log\/[^\/]+/, // Add files matched by this pattern to
                                      // the feed.
            path: "/log/feed.xml",    // feed url
            template: "rss.tpl",      // template
            limit: 10,                // total maximum
            sort: [["date", "desc"]]  // newest first

    properties: {
        siteTitle: "My Site"


That's it for the moment. Extended documentation will soon follow in the wiki.

Bugs and Issues

If you encounter any bugs or issues, feel free to open an issue at github.


This package is licensed under the MIT license.

Something went wrong with that request. Please try again.