Open rtack opened 8 years ago
Yeah - this is definitely an issue.
The real problem is, I think, that you can have the search box at different path levels (ie, at our site you can search from http://manas.com.ar/, http://manas.com.ar/staff, or http://manas.com.ar/staff/mgarcia). In those cases, if you want to use a relative URL you have to use them differently - or add any way to the page for declaring how many nesting levels to go back.
It's definitely doable, but I'm not that sure your helper works for all the cases. I'll give it a try - and start implementing that if works at least for a nice percentage of the cases. But I think there's more than that for this issue.
Thanks for the feedback! :)
@rtack we've just released middleman-search
v0.8.0, which includes #9
That should solve your issue. It doesn't use relative paths, but the absolute paths it uses honor the :http_prefix
Middleman setting.
Can you confirm us this works?
Using search_index_path I always got the absolute path back but for hosting on github a relative path is needed.
I wrote my own helper which uses link_to to get the relative path.