     Agent.update Serum.Build.PostInfoStorage, &([info|&1])
   end
 
+  defp make_preview(_html, 0) do
+    ""
+  end
+
+  defp make_preview(html, maxlen) do
+    html
+    |> Floki.parse
+    |> Enum.filter(&(elem(&1, 0) == "p"))
+    |> Enum.map(&(Floki.text elem(&1, 2)))
+    |> Enum.join(" ")
+    |> String.slice(0, maxlen)
+  end
+
   def tag_task(dest, {k, v}, template) do
     tagdir = "#{dest}tags/#{k.name}/"
     pt = "Posts Tagged \"#{k.name}\""

                    tag = String.trim x
                    %{name: tag, list_url: "#{Keyword.get proj, :base_url}tags/#{tag}/"}
                  end)
      {:ok, {title, tags}}
    rescue
      _ in MatchError ->
        {:error, :invalid_header}
    end
  end


          i = if i > 59, do: 59, else: i
          {h, i}
        end
      {y, m, d, h, i}
    rescue
      _ in MatchError ->
        mkinfo_fail srcdir, filename, :invalid_filename
    end
  end

  defp extract_title_tags(srcdir, filename, title, tags, proj) do
    try do
      {"# " <> title, "#" <> tags} = {title, tags}
      title = title |> String.trim
