     |> Repo.preload([:channel])
     |> Repo.preload([:developer])
 
-    canonical_post = Application.get_env(:tilex, :canonical_domain)
-      <> post_path(conn, :show, post)
-
     conn
-    |> assign(:canonical_url, canonical_post)
+    |> assign_post_canonical_url(post)
     |> assign(:twitter_shareable, true)
     |> render("show.#{format}", post: post)
   end


  defp extracted_slug(<<slug::size(10)-binary, _rest::binary>>), do: {:ok, slug}
  defp extracted_slug(_), do: :error
end

    post = Repo.one(query)

    conn
    |> assign_post_canonical_url(post)
    |> assign(:twitter_shareable, true)
    |> render("show.html", post: post)
  end
