【问题标题】:404 page not working with permalink: pretty using GitHub Pages + Jekyll404 页面无法使用永久链接:使用 GitHub Pages + Jekyll 非常漂亮
【发布时间】:2018-03-17 17:51:48
【问题描述】:

在我的config.yml 中,我将永久链接设置为漂亮:

permalink: pretty

当我这样做时,当出现 404 错误时,我的 404.html 页面不再显示在我的网站上(托管在 GitHub 页面上)。我该如何解决这个问题?

【问题讨论】:

    标签: github http-status-code-404 jekyll github-pages


    【解决方案1】:

    你需要做的是在你的 404.html 文件的前面添加这个:

    ---
    permalink: /404.html
    ---
    

    https://help.github.com/articles/creating-a-custom-404-page-for-your-github-pages-site/

    【讨论】:

      猜你喜欢
      • 2016-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-15
      • 1970-01-01
      • 1970-01-01
      • 2011-07-01
      相关资源
      最近更新 更多