firehose/app/lib/firehose_web/controllers/page_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

14 lines
352 B
Elixir

defmodule FirehoseWeb.PageController do
use FirehoseWeb, :controller
def home(conn, _params) do
recent_posts =
(Firehose.EngineeringBlog.recent_posts(3) ++
Firehose.ReleaseNotes.recent_posts(3))
|> Enum.sort_by(& &1.date, {:desc, Date})
|> Enum.take(6)
render(conn, :home, recent_posts: recent_posts)
end
end