JOL/lib/jol_web/controllers/page_controller.ex
Jessica Canady 1bf44f3344
MEGACOMMIT: Ton of blog and layout work.
Mostly reimplementing the old Zola theme.
2024-07-30 11:46:47 -04:00

23 lines
523 B
Elixir

defmodule JOLWeb.PageController do
require Logger
use JOLWeb, :controller
@spec home(Plug.Conn.t(), any()) :: Plug.Conn.t()
def home(conn, _params) do
conn
|> assign(:page_title, "Home")
|> render(:home)
end
@spec tags(Plug.Conn.t(), any()) :: Plug.Conn.t()
def tags(conn, _params) do
Logger.debug(JOL.Blog.posts())
Logger.debug(JOL.Blog.unique_tag_list())
conn
|> assign(:tags, JOL.Blog.unique_tag_list())
|> assign(:page_title, "Post Tags")
|> render(:tags)
end
end