0

Publify is the perfect gem for my needs at the moment, except I cannot figure out how to move it to "/blog".

I changed root "articles#index to get "/blog", to: "articles#index", but all the internal references to the root path in the application lead to the wrong place.

How can I properly achieve what I am trying to accomplish?

Dylan Richards
  • 796
  • 3
  • 9
  • 26

2 Answers2

0

You can try something like :

root "articles#index"

get "/blog" => redirect("/")
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317
0

On way is to add config.relative_url_root = "/blog" to application.rb file. See more in the rails guide.

The alternative idea is to leave the app like it is and use the webserver/passenger to run it in a subdirectory.

Bruno E.
  • 1,284
  • 11
  • 16