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

    .on 'end', ->
      exec 'jekyll build'


gulp.task 'default', ['build']

insert = require 'gulp-insert'

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

chapters = fs.readdirSync path.dirname paths.src
