Add route for feed.xml.
This commit is contained in:
parent
7309e8e374
commit
f3bcea48e6
|
@ -14,6 +14,10 @@ defmodule JOLWeb.Router do
|
||||||
plug :accepts, ["json"]
|
plug :accepts, ["json"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
pipeline :feeds do
|
||||||
|
plug :accepts, ["xml"]
|
||||||
|
end
|
||||||
|
|
||||||
scope "/", JOLWeb do
|
scope "/", JOLWeb do
|
||||||
pipe_through :browser
|
pipe_through :browser
|
||||||
|
|
||||||
|
@ -27,10 +31,11 @@ defmodule JOLWeb.Router do
|
||||||
get "/blog/:slug", BlogController, :show
|
get "/blog/:slug", BlogController, :show
|
||||||
end
|
end
|
||||||
|
|
||||||
# Other scopes may use custom stacks.
|
scope "/", JOLWeb do
|
||||||
# scope "/api", JOLWeb do
|
pipe_through :feeds
|
||||||
# pipe_through :api
|
|
||||||
# end
|
get "/feed.xml", FeedController, :feed
|
||||||
|
end
|
||||||
|
|
||||||
# Enable LiveDashboard and Swoosh mailbox preview in development
|
# Enable LiveDashboard and Swoosh mailbox preview in development
|
||||||
if Application.compile_env(:jol, :dev_routes) do
|
if Application.compile_env(:jol, :dev_routes) do
|
||||||
|
|
Loading…
Reference in a new issue