   end
 
   @spec create_struct(binary(), map(), binary(), map()) :: t()
-  defp create_struct(path, header, html, proj) do
+  defp create_struct(path, header, data, proj) do
     tags = Tag.batch_create(header[:tags], proj)
     datetime = header[:date]
     date_str = Timex.format!(datetime, proj.date_format)

      file: path,
      title: header.title,
      tags: tags,
      html: html,
      raw_date: raw_date,
      date: date_str,
      url: Path.join(proj.base_url, filename),

    with {:ok, file} <- File.open(path, [:read, :utf8]),
         {:ok, {header, data}} <- get_contents(file, path) do
      File.close(file)
      {:ok, create_struct(path, header, data, proj)}
    else
      {:error, reason} when is_atom(reason) -> {:error, {reason, path, 0}}
      {:error, _} = error -> error
