chore(travis): make docs-index task skip files without yaml

This commit is contained in:
Andy Joslin
2014-03-26 09:30:01 -06:00
parent 025a3b0878
commit c1dbe040fe

View File

@@ -69,6 +69,11 @@ gulp.task('docs-index', function() {
// Read out the yaml portion of the Jekyll file
var title, layout;
var yamlStartIndex = contents.indexOf('---');
if (yamlStartIndex === -1) {
return callback();
}
var yamlEndIndex = contents.indexOf('---', yamlStartIndex+3); //starting from start
var yamlRaw = contents.substring(yamlStartIndex+3, yamlEndIndex);