Reputation: 103
I'm using jekyll-redirect-from
gem to generate redirect pages for my Jekyll website hosted with Github Pages. All works fine locally but no redirects HTMLs are generated on GitHub.
Here is my _config.yml
title: My Title
baseurl: /my-project
url: "https://my-organisarion.github.io/my-project"
google_analytics: # set tracking
permalinks: pretty
markdown: kramdown
exclude:
- Gemfile
- Gemfile.lock
Note, locally I'm setting url: "http://localhost:4000"
and omiting baseurl
.
and Gemfile
:
source "https://rubygems.org"
ruby RUBY_VERSION
gem "github-pages", group: :jekyll_plugins
group :jekyll_plugins do
gem "jekyll-redirect-from"
end
Upvotes: 2
Views: 171
Reputation: 10008
In your _config.yml:
gems:
- jekyll-redirect-from
Did you read this ? https://help.github.com/articles/redirects-on-github-pages/
Upvotes: 3