【问题标题】:How to fix "error `/' not found" error about jekyll in localhost:4000如何修复 localhost:4000 中有关 jekyll 的“error `/' not found”错误
【发布时间】:2019-05-12 14:39:00
【问题描述】:

当我运行jekyll serve 时,我会在浏览器中打开站点 localhost:4000。部分页面显示 404。服务指示错误 "error `/' not found"。
但是打开网站时使用'https://username.github.io',一切正常。
完全糊涂了。

enter image description here

【问题讨论】:

    标签: jekyll blogs


    【解决方案1】:

    您需要将“_config.yml”中的参数“baseurl”更改为您希望为您的网站提供服务的路径或注释“baseurl”行以允许“/” 改为使用。

    【讨论】:

    • 将 baseurl 的值设置为空字符串 - baseurl: "" 有效。同样,注释掉整行也起到了作用 - #baseurl: ""
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-10
    • 2020-01-09
    • 2020-04-10
    • 2012-03-30
    • 2021-01-25
    相关资源
    最近更新 更多