     )
   end
 
-  def index(conn, %{"format" => format}) when format in ~w(rss atom), do: redirect(conn, to: "/rss")
+  def index(conn, %{"format" => format}) when format in ~w(rss atom),
+    do: redirect(conn, to: "/rss")
 
   def index(conn, params) do
-    page = params
-    |> Map.get("page", "1")
-    |> String.to_integer
+    page =
+      params
+      |> Map.get("page", "1")
+      |> String.to_integer()
 
     posts = Posts.all(page)
 


  def show(%{assigns: %{slug: slug}} = conn, _) do
    format = Controller.get_format(conn)
    post = Post
    |> Repo.get_by!(slug: slug)
    |> Repo.preload([:channel])
    |> Repo.preload([:developer])

    conn
    |> assign_post_canonical_url(post)

    case extracted_slug(conn.params["titled_slug"]) do
      {:ok, slug} ->
        assign(conn, :slug, slug)

      :error ->
        conn
        |> put_status(404)
