 
 # Get the frontmatter plus content of a file
 getDataAndContent = (filepath) ->
-  lines = fs.readFileSync(filepath).toString().split(/\r\n|\n|\r/)
-  data = {}
+  content = fs.readFileSync(filepath).toString()
+  lines = content.split(/\r\n|\n|\r/)
   if /^---\s?$/.test lines[0]
     lines.shift()
     frontMatter = []

  for file in fs.readdirSync layoutDir
    name = path.basename file, path.extname file
    { data, content } = getDataAndContent path.join(layoutDir, file)
    fileData[name] = data
    fileContents[name] = content


        data = { value: data }

  data: data
  content: if data then lines.join("\n") else content
  ext: path.extname filepath

getPermalink = (post, style) ->
