【问题标题】:Warning on starting hugo server启动hugo服务器的警告
【发布时间】:2022-06-11 05:42:03
【问题描述】:

我在启动 hugo 服务器时收到以下警告。

我收到错误的 Git Repo:https://github.com/jayrp11/mysite

WARN 2022/06/09 16:04:59 found no layout file for "HTML" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2022/06/09 16:04:59 found no layout file for "HTML" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2022/06/09 16:04:59 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2022/06/09 16:04:59 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

我可以看到该网站运行良好。我可以看到内容,但我不确定为什么控制台上出现这些错误?

我确认这些警告来自 p1.md 和 p2.md 文件。我是 hugo 的新手,并试图为每个子页面创建一个包含一些摘要内容的页面。有更好的实现方式吗?

【问题讨论】:

    标签: templates hugo


    【解决方案1】:

    把它放在你的配置文件中:

    disableKinds:
    - taxonomy
    

    并在您的layouts/_default/ 目录中添加一个single.html 和一个list.html。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-18
      • 1970-01-01
      • 2017-09-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多