fs = require('fs');

module.exports = {
    publicClasses: function(context, options) {
        'use strict';
        var ret = "";

        for(var i=0; i < context.length; i++) {
            if(!context[i].itemtype && context[i].access === 'public') {
                ret = ret + options.fn(context[i]);
            } else if (context[i].itemtype) {
                ret = ret + options.fn(context[i]);
            }
        }

        return ret;
    },
    search : function(classes, modules) {
        'use strict';
        var ret = '';

        for(var i=0; i < classes.length; i++) {
            if(i > 0) {
                ret += ', ';
            }
            ret += "\"" + 'classes/' + classes[i].displayName + "\"";
        }

        if(ret.length > 0 && modules.length > 0) {
            ret += ', ';
        }

        for(var j=0; j < modules.length; j++) {
            if(j > 0) {
                ret += ', ';
            }
            ret += "\"" + 'modules/' + modules[j].displayName + "\"";
        }

        return ret;
    }
};

@@ -1,22 +1,113 @@
-fs = require('fs')
+var fs, path, markdown;%0Afs = require('fs');%0Apath = require(%22path%22);%0Amarkdown = require( %22markdown%22 ).markdown
 ;%0A%0Am
@@ -1122,21 +1122,718 @@
 return ret;%0A
+    %7D,%0A    homeContent : function () %7B%0A        var config = path.join(process.cwd(), 'yuidoc');%0A        if (fs.existsSync(config + '.json') === true) %7B%0A            config = require(config);%0A        %7D%0A%0A        var content = config.theme.home%0A        if (typeof content === 'string' && content !== '') %7B%0A            content = path.join(process.cwd(), content);%0A        %7D else %7B%0A            content = path.join(process.cwd(), 'README.md');%0A        %7D%0A       %0A        if (fs.existsSync(content) === true) %7B  %0A            content = fs.readFileSync(content, %7Bencoding: %22utf8%22%7D);%0A            content = markdown.toHTML(content);%0A        %7D else %7B%0A            content = '';%0A        %7D%0A        return content;%0A
     %7D%0A%7D;%0A

Add helper for home page content