   import Serum.Util
   alias Serum.Error
   alias Serum.Build
+  alias Serum.PostInfo
   alias Serum.Renderer
 
   @type state :: Build.state

  end

  @doc false
  @spec tag_task({Serum.Tag.t, [Serum.PostInfo.t]}, binary, state) :: :ok

  def tag_task({tag, posts}, dest, state) do
    tagdir = Path.join [dest, "tags", tag.name]

    save_list Path.join(tagdir, "index.html"), title, posts, state
  end

  @spec save_list(binary, binary, [PostInfo.t], state) :: :ok

  defp save_list(path, title, posts, state) do
    list_ctx = [header: title, posts: posts]
