code: function determineTemplate(item, markFile, json) {
    
    // **1.** .md data file with a `template: file.pug` defined.
    if (markFile && markFile.normal && markFile.normal.meta && markFile.normal.meta.template) {
      return path.resolve(json.templateDir, markFile.normal.meta.template);
    }
    
    // **2.** Globally defined in the templates object in markade config
    if (json.templates) {
      var temp =  Object.keys(json.templates).filter(function(template) {
        if (json.templates[template].indexOf(item.dataFile) >= 0)
          return path.resolve(json.templateDir, template);
      });
    }
    
    // **3.** If none found, it defaults to a file with the same name in the template directory. 
    var _template = path.basename(item.data, ".md") + ".pug";
    return path.resolve(json.templateDir, item.directory, _template);
  }
docs: Locates the template file to use, in order: