【问题标题】:Jekyll blog theme now showing blog posts on GitLab PagesJekyll 博客主题现在在 GitLab 页面上显示博客文章
【发布时间】:2019-05-17 19:42:02
【问题描述】:

我在 GitHub Pages 上的博客中一直使用 Emerald jekyll theme。在 GitHub 上一切都很好,但我想搬到 GitLab。

我让博客使用了所有必要的 gem(如 jekyll 和 jekyll-paginate),但博客帖子无法正常工作,我得到 404。

现场测试here

我将repo 公开,以便每个人都可以查看并可能发现我的问题。

【问题讨论】:

    标签: ruby gitlab jekyll


    【解决方案1】:

    Since GitLab 11.8 (February 2019) 这应该可以工作

    .html 扩展现在会为 Pages 网站自动解析

    您的 Pages 网站中名为 /sub-page.html 的文件现在也可以作为 /sub-page 访问,从而为您的网站向用户显示的方式提供更多选择。

    documentationgitlab-org/gitlab-pages issue 95

    【讨论】:

      【解决方案2】:

      只需将.html 扩展名添加到您的链接。

      https://remieditor.gitlab.io/blog/plausible-gitlab-moving.html

      Github 提供了一个无需扩展的服务选项,但我不相信 Gitlab 允许这样做。看到这个帖子:https://gitlab.com/gitlab-org/gitlab-pages/issues/95

      更改您的永久链接配置:

      permalink: /:title:output_ext
      

      【讨论】:

      • 有道理。谢谢!立即将 repo 更改为私有
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-29
      • 1970-01-01
      相关资源
      最近更新 更多