docs: function buildNav(data) {
    // var doclets = data().get();
    // var graftNodes = {};
    // graft(graftNodes, doclets);
    // fs.writeFileSync(path.resolve(outdir, 'dump-graft.json'), dumper.dump(graftNodes), 'utf8');
    // fs.writeFileSync(path.resolve(outdir, 'dump-jsdoc3-members.json'), dumper.dump(members), 'utf8');
    // fs.writeFileSync(path.resolve(outdir, 'dump-doclets.json'), dumper.dump(doclets), 'utf8');
  
    var seen = {};
    var exclude = (env.conf.exclude || []).map(function(e) {
      return typeof e === "string" ? { longname: e } : e;
    });
  
    var memberGroups = data({
        'memberof': {
          isString: true
        }
      })
      .get()
      .filter(createExclude(exclude))
      .reduce(function (container, item) {
        var groupName = item.memberof;
  
        if (!container.hasOwnProperty(groupName)) {
          container[groupName] = [];
        }
        container[groupName].push(item);
        return container;
      }, {});
  
    var globalGroup = data({
        'scope': 'global'
      })
      .get()
      .filter(createExclude(exclude))
      .filter(function (item) {
        return !memberGroups.hasOwnProperty(item.longname);
      });
  
    // fs.writeFileSync(path.resolve(outdir, 'dump-memberof.json'), dumper.dump(memberGroups), 'utf8');
    // fs.writeFileSync(path.resolve(outdir, 'dump-global.json'), dumper.dump(globalGroup), 'utf8');
  
    var nav = ''; //'<h2><a href="index.html">Home</a></h2>';
    nav += buildMemberNav(globalGroup, 'global', seen, linkto);
  
    return Object.keys(memberGroups).reduce(function (html, groupName) {
      html += buildMemberNav(memberGroups[groupName], groupName, seen, linkto);
      return html;
    }, nav);
  }