firehose/blogex/examples/sitemap_controller.ex
Your Name bc14696f57 Static blog with front page summary
Goal: have a personal blog, and try out another point in the 'modular
app design with elixir' space.

Designing OTP systems with elixir had some interesting ideas.
2026-03-17 11:17:21 +00:00

15 lines
344 B
Elixir

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