lib/blog.js
function Blog(loader, options) {
    this.slugs = {};
    this.ids = {};
    this.posts = [];
    this.length = 0;
    options = options || {};
    if (typeof loader === 'string') {
        loader = new FileSystemLoader(loader, options);
    } else if (Array.isArray(loader)) {
        loader = new ArrayLoader(loader);
    }
    var self = this;
    loader.on('error', function (err) {
        self.emit('error', err);
    });
    loader.on('load', this.onLoad.bind(this));
    loader.on('new_post', this.onNewPost.bind(this));
    loader.on('updated_post', this.onUpdatedPost.bind(this));
    loader.on('removed_post', this.onRemovedPost.bind(this));
}
function Blog(loader, options) {
    this.slugs = {};
    this.ids = {};
    this.posts = [];
    this.length = 0;
    options = options || {};
    if (typeof loader === 'string') {
        loader = new FileSystemLoader(loader, options);
    } else if (Array.isArray(loader)) {
        loader = new ArrayLoader(loader);
    }
    var self = this;
    loader.on('error', function (err) {
        self.emit('error', err);
    });
    loader.on('load', this.onLoad.bind(this));
    loader.on('new_post', this.onNewPost.bind(this));
    loader.on('updated_post', this.onUpdatedPost.bind(this));
    loader.on('removed_post', this.onRemovedPost.bind(this));
}
function Blog ( loader , options ) { this . slugs = { } ; this . ids = { } ; this . posts = [ ] ; this . length = 0 ; options = options || { } ; if ( typeof loader === 'string' ) { loader = new FileSystemLoader ( loader , options ) ; } else if ( Array . isArray ( loader ) ) { loader = new ArrayLoader ( loader ) ; } var self = this ; loader . on ( 'error' , function ( err ) { self . emit ( 'error' , err ) ; } ) ; loader . on ( 'load' , this . onLoad . bind ( this ) ) ; loader . on ( 'new_post' , this . onNewPost . bind ( this ) ) ; loader . on ( 'updated_post' , this . onUpdatedPost . bind ( this ) ) ; loader . on ( 'removed_post' , this . onRemovedPost . bind ( this ) ) ; }
Create a new blog.

@param {Loader|Array|String} loader
@param {Object} options (optional)
Create a new blog .