Skip to content

Commit

Permalink
chore(travis): make docs-index task skip files without yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Mar 26, 2014
1 parent 025a3b0 commit c1dbe04
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c1dbe04

Please sign in to comment.