hugo-fixit / FixIt

🔧 A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
https://fixit.lruihao.cn
MIT License
646 stars 96 forks source link

[BUG] Cannot run serve with theme #491

Closed itlvd closed 4 weeks ago

itlvd commented 4 weeks ago

Describe the bug 描述你遇到的错误

When I run hugo serve, the blog cannot run and show error. When I try to build in Linux and hosting in Vercel, Cloudflare that works, but I run on Windows, it fails.

ERROR render of "term" failed: "\themes\FixIt\layouts\taxonomy\rss.xml:39:39": execute of template failed: template: taxonomy/rss.xml:39:39: executing "taxonomy/rss.xml" at <partial "rss/item.html">: error calling partial: partial "rss/item.html" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.

ERROR render of "term" failed: "\themes\FixIt\layouts\taxonomy\rss.xml:39:39": execute of template failed: template: taxonomy/rss.xml:39:39: executing "taxonomy/rss.xml" at <partial "rss/item.html">: error calling partial: "\themes\FixIt\layouts\partials\rss\item.html:36:122": execute of template failed: template: partials/rss/item.html:36:122: executing "partials/rss/item.html" at <partial "plugin/image.html">: error calling partial: partial "plugin/image.html" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.

ERROR render of "section" failed: "\themes\FixIt\layouts\posts\rss.xml:53:39": execute of template failed: template: posts/rss.xml:53:39: executing "posts/rss.xml" at <partial "rss/item.html">: error calling partial: partial "rss/item.html" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.
Built in 30820 ms

Error: error building site: render: failed to render pages: render of "term" failed: "\themes\FixIt\layouts\taxonomy\rss.xml:39:39": execute of template failed: template: taxonomy/rss.xml:39:39: executing "taxonomy/rss.xml" at <partial "rss/item.html">: error calling partial: partial "rss/item.html" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.

Expected behavior 期待的行为

build successful and access by localhost

Screenshots 屏幕截图

No response

Build Environment 构建环境

Preview Environment 预览环境

No response

Additional Information 补充信息

No response

Lruihao commented 4 weeks ago

When I update to master(6a8365050645084c33f444f26c5fc68ec807d7f5), It works fine in hugo-fixit-starter1.

Please confirm if it is caused by your custom actions.

itlvd commented 4 weeks ago

Hi @Lruihao

I was debug my hugo.toml. When I turn on cacheRemoteImage, the error will appear. Then I turn off, it works properly.

[params.page.cacheRemoteImages]
      enable = true
      # replace remote image url with local image url (place in public/images/remote/)
      replace = true
Lruihao commented 4 weeks ago

Hi @Lruihao

I was debug my hugo.toml. When I turn on cacheRemoteImage, the error will appear. Then I turn off, it works properly.


[params.page.cacheRemoteImages]

      enable = true

      # replace remote image url with local image url (place in public/images/remote/)

      replace = true

cacheRemoteImages depends on internet, you can turn off it locally by split config file to a config directory.