【问题标题】:Jekyll redirects are not generated at GitHubGitHub 不生成 Jekyll 重定向
【发布时间】:2016-11-06 21:13:45
【问题描述】:

我正在使用jekyll-redirect-from gem 为我的由 Github Pages 托管的 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

【问题讨论】:

    标签: redirect jekyll github-pages


    【解决方案1】:

    在你的 _config.yml 中:

    gems:
      - jekyll-redirect-from
    

    你读过这个吗? https://help.github.com/articles/redirects-on-github-pages/

    【讨论】:

    • 非常感谢!就是这样!
    猜你喜欢
    • 1970-01-01
    • 2017-01-25
    • 1970-01-01
    • 1970-01-01
    • 2017-02-01
    • 1970-01-01
    • 2017-06-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多