code: function(files, metalsmith, done){
              var yuiDocsData = require('../docs/data.json');
  
              var makeUrl = function(docClass, method){
                  var out = '/docs/classes/' + docClass + '.html';
                  if(method){
                      out += '#method_' + method;
                  }
                  return out;
              };
  
              for(var key in files){
                  var file = files[key];
                  if(file.docs_class){
                      file.yui_class_data = yuiDocsData.classes[file.docs_class];
                      if(file.docs_method){
                          file.yui_method_url = makeUrl(file.docs_class) + '#method_' + file.docs_class;
                      }
                  }
                  var relatedDocs = file.related_methods;
                  var relatedDocsFormatted = [];
                  if(relatedDocs){
                      relatedDocs.forEach(function(doc){
                          if(doc.indexOf('.') !== -1){
                              var arr = doc.split('.');
                              relatedDocsFormatted.push({
                                  name: arr[0] + '.prototype.' + arr[1] + '()',
                                  class: arr[0],
                                  method: arr[1],
                                  url: makeUrl(arr[0], arr[1])
                              });
                          } else {
                              relatedDocsFormatted.push({
                                  name: doc + '()',
                                  class: doc,
                                  url: makeUrl(doc)
                              });
                          }
                      });
                      file.related_docs = relatedDocsFormatted;
                  }
              }
              done();
          }
docs: sets yui docs data to pages with "docs_class" set