     |> GlobalBindings.get()
     |> Map.fetch!(:server_root)
   end
-
-  @spec write_sitemap(binary()) :: Result.t(Serum.File.t())
-  defp write_sitemap(dest) do
-    all_posts = GlobalBindings.get(:all_posts)
-
-    file = %Serum.File{
-      dest: Path.join(dest, "sitemap.xml"),
-      out_data: sitemap_xml(all_posts, &to_w3c_format/1, get_server_root())
-    }
-
-    Serum.File.write(file)
-  end
 end

  def implements, do: [build_succeeded: 3]

  def build_succeeded(_src, dest, _args) do
    case write_sitemap(dest) do
      {:ok, _} -> :ok
      {:error, _} = error -> error
    end


  require EEx
  alias Serum.GlobalBindings
  alias Serum.Page
  alias Serum.Post

  def name, do: "Create sitemap for search engine"
  def version, do: "1.1.0"
