How to mount Publify at "/blog" instead of at root path?

108 views Asked by At

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?

2

There are 2 answers

0
Arup Rakshit On

You can try something like :

root "articles#index"

get "/blog" => redirect("/")
0
Bruno E. On

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.