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.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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
|
||||
Reference in New Issue
Block a user