defmodule FirehoseWeb.SitemapController do
  @moduledoc """
  Example controller for serving the blog sitemap.
  """
  use MyAppWeb, :controller

  def index(conn, _params) do
    xml = Blogex.SEO.sitemap(Blogex.blogs(), FirehoseWeb.Endpoint.url())

    conn
    |> put_resp_content_type("application/xml")
    |> send_resp(200, xml)
  end
end
