警告启动雨果服务器

发布于 2025-02-06 09:52:45 字数 1021 浏览 1 评论 0原文

启动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)的新手,并试图为每个孩子页面创建一个带有摘要内容的页面。是更好的实现方法吗?

I am getting below warning when I start hugo server.

Git Repo where I am getting the errors: 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.

I can see the site is working fine. I am able to see the contents but I am not sure why those errors on console?

I confirmed that these warnings are from p1.md and p2.md files. I am new to hugo and trying to create a page with bit of summary content for each child page. Is better way to achieve?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

喜爱纠缠 2025-02-13 09:52:45

将其放入您的配置文件中:

disableKinds:
- taxonomy

并在layouts/_default/ Directory中添加一个.html和list.html。

Put this in your config file:

disableKinds:
- taxonomy

And add a single.html and a list.html in your layouts/_default/ directory.

别在捏我脸啦 2025-02-13 09:52:45

我遇到了同样的警告。事实证明,我使用主题,并且在Hugo Server之前没有安装它。

就我而言,我使用git子模块。因此,我必须运行:

git submodule init
git submodule update

在Project的根目录中。

希望它能为您提供一些帮助。

I met the same warning. It turns out that I use a theme and haven't install it before hugo server.

In my case, I use git submodule. So I have to run:

git submodule init
git submodule update

at project's root directory.

Hopefully, it can give you some help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文