diff --git a/gulpfile.js b/gulpfile.js index 1786bc2664..ab6d83a869 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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);