     .on 'end', ->
       exec 'jekyll build'
 
-
 gulp.task 'default', ['build']


insertFrontMatter = (contents, file) ->
  name = path.basename file.path
  matches = name.match /^(\d+)-([\w-]+).coffee.md$/
  return contents if not matches
  idx = parseInt matches[1]
  title = capitalize matches[2].replace /-/g, ' '

insert = require 'gulp-insert'

paths =
  src: 'chapters/*.litcoffee'
  dst: 'pages'

chapters = fs.readdirSync path.dirname paths.src
