nquinlan / jekyll-pageless-redirects

Generates redirect pages based on YAML or htaccess style redirects.
MIT License
83 stars 14 forks source link

Redirect not working #6

Closed samdoidge closed 1 year ago

samdoidge commented 10 years ago

Edit: I get the following error when serving locally: /Library/Ruby/Gems/2.0.0/gems/jekyll-2.1.1/lib/jekyll/cleaner.rb:59: stack level too deep (SystemStackError) Removing the plugin from _plugins fixes this.

So I have added the plugin and redirect into my Jeykll repo

Custom domain: http://samdoidge.com

I use the master branch as from the github article: For User Pages, use the master branch in your username.github.io repository. For Project Pages, use the gh-pages branch in your project's repository.

Outcome: 404 Error

mhluska commented 9 years ago

I fixed it by changing the relevant portion in def generate_aliases to this:

index_path = alias_index_path.split('/')[0, sections + 1].join('/')
next if index_path.empty?

@site.static_files << Jekyll::PagelessRedirectFile.new(@site, @site.dest, index_path, '')

Let me know if you need clarification.