setup: function(config) { var self = this; self.contentDir = config.content_dir; var markdown_parser = config.plugins.parsers[".markdown"]; self.parser = module_utils.requireAndSetup(markdown_parser, config); // setup default content handler default_content_handler.setup(config); },
self.getContent(basepath, function(err, contents, modified_date) { if (!err) { collected_contents = _.extend(collected_contents, contents); last_modified = modified_date; var run_callback = function() { return callback(null, collected_contents, content_options, last_modified); }; //fetch shared content default_content_handler.getSharedContent(function(err, shared_content, shared_modified_date) { if (!err) { collected_contents = _.extend(shared_content, collected_contents); if (shared_modified_date > last_modified) { last_modified = shared_modified_date; } } return run_callback(); }); } else { return callback("[Error: Content for " + basepath + " not found]", null, null, {}); } });
getContentPaths: function(basepath, callback) { return default_content_handler.getContentPaths(basepath, callback); },
getSections: function(callback) { return default_content_handler.getSections(callback); },
isSection: function(basepath) { return default_content_handler.isSection(basepath); },