Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
file based static website/blog generator --
JavaScript

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.npmignore
LICENSE.mkd
README.mkd
bread.js
package.json

README.mkd

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.

Example

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"
    }
};

bread(conf);

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.

License

This package is licensed under the MIT license.

Something went wrong with that request. Please try again.