From f3bcea48e647e9e6f72bcac781ab3231f3bdb8a0 Mon Sep 17 00:00:00 2001 From: Jessica Phoenix Canady Date: Tue, 20 Aug 2024 16:50:07 -0400 Subject: [PATCH] Add route for feed.xml. --- lib/jol_web/router.ex | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/jol_web/router.ex b/lib/jol_web/router.ex index d656163..2e644a3 100644 --- a/lib/jol_web/router.ex +++ b/lib/jol_web/router.ex @@ -14,6 +14,10 @@ defmodule JOLWeb.Router do plug :accepts, ["json"] end + pipeline :feeds do + plug :accepts, ["xml"] + end + scope "/", JOLWeb do pipe_through :browser @@ -27,10 +31,11 @@ defmodule JOLWeb.Router do get "/blog/:slug", BlogController, :show end - # Other scopes may use custom stacks. - # scope "/api", JOLWeb do - # pipe_through :api - # end + scope "/", JOLWeb do + pipe_through :feeds + + get "/feed.xml", FeedController, :feed + end # Enable LiveDashboard and Swoosh mailbox preview in development if Application.compile_env(:jol, :dev_routes) do