【问题标题】:Hugo site doesn't display properly when deployed to github pages部署到 github 页面时,Hugo 站点无法正确显示
【发布时间】:2020-06-10 10:36:31
【问题描述】:

将 Hugo 网站上传到 Github 页面时,该网站看起来像是部分加载了许多内容缺失。这可能是什么原因?

【问题讨论】:

    标签: github-pages hugo


    【解决方案1】:

    一个主要原因是您的config 文件中的baseURL 可能设置错误。

    如果是用户/组织页面,请将其设置为 baseURL = "https://<your-username>.github.io/,如果是项目页面,请将其设置为 baseURL = "https://<your-username>.github.io/<your-project-name>

    您通常可以在 Hugo 项目的根目录中找到名为 config.tomlconfig 文件

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-30
      • 1970-01-01
      • 2019-03-31
      • 2021-12-14
      • 2020-09-21
      • 1970-01-01
      • 2020-08-23
      • 2015-02-25
      相关资源
      最近更新 更多