jekyll / jekyll-redirect-from

:twisted_rightwards_arrows: Seamlessly specify multiple redirections URLs for your pages and posts.
MIT License
782 stars 114 forks source link

Current gem version inconsistency #162

Closed Frotty closed 7 years ago

Frotty commented 7 years ago

I just noticed that I had an old redirect.html already present, which the plugin didn't overwrite. This was causing the error. So my bad!


Hello,

this is an issue only present on the gem that is installed via

gem install jekyll-redirect-from

or from a bundle install for a jekyll page like in my case.

The problem is, that the layout generated into the _layouts/redirect.html file doesn't use the .from and .to parameters to access the urls yet, but the code already provides the object in that form.

This leads to the redirect looking like this:

<meta http-equiv="refresh" content="0; url={"from"=>"/sub/dir/", "to"=>"http://localhost:4000/"}">

which leads to a redirect-loop on the file itself or redirecting to http://localhost:4000/{ which will of course error.

The layout has already been fixed apparently: https://github.com/jekyll/jekyll-redirect-from/blob/master/lib/jekyll-redirect-from/redirect.html and when I use this one it works for me.

However the gem still seems to provide the old one.