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