Jekyll 重定向未在 GitHub 处生成
Jekyll redirects are not generated at GitHub
我正在使用 jekyll-redirect-from
gem 为托管在 Github 页面的 Jekyll 网站生成重定向页面。在本地一切正常,但没有在 GitHub.
上生成重定向 HTML
这是我的_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
请注意,我在本地设置 url: "http://localhost:4000"
并省略 baseurl
。
和Gemfile
:
source "https://rubygems.org"
ruby RUBY_VERSION
gem "github-pages", group: :jekyll_plugins
group :jekyll_plugins do
gem "jekyll-redirect-from"
end
在你的_config.yml中:
gems:
- jekyll-redirect-from
你读了吗? https://help.github.com/articles/redirects-on-github-pages/
我正在使用 jekyll-redirect-from
gem 为托管在 Github 页面的 Jekyll 网站生成重定向页面。在本地一切正常,但没有在 GitHub.
这是我的_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
请注意,我在本地设置 url: "http://localhost:4000"
并省略 baseurl
。
和Gemfile
:
source "https://rubygems.org"
ruby RUBY_VERSION
gem "github-pages", group: :jekyll_plugins
group :jekyll_plugins do
gem "jekyll-redirect-from"
end
在你的_config.yml中:
gems:
- jekyll-redirect-from
你读了吗? https://help.github.com/articles/redirects-on-github-pages/