 insert = require 'gulp-insert'
 
 paths =
-  src: 'chapters/*.coffee.md'
+  src: 'chapters/*.litcoffee'
   dst: 'pages'
 
 chapters = fs.readdirSync path.dirname paths.src

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


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


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