dillonzq / LoveIt

❤️A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
https://hugoloveit.com
MIT License
3.41k stars 1.08k forks source link

[BUG] 输入 `hugo server -D`,会报错 #588

Open sanbeichahegongheguo opened 3 years ago

sanbeichahegongheguo commented 3 years ago

Describe the bug 描述你遇到的错误

输入 hugo server -D,会出现:

\content\posts\index.zh-cn.md:1:1": timed out initializing value. This is most likely a circular loop in a shortcode

这样的报错。请问是正常情况吗?

Screenshots 屏幕截图

图片

Build Environment 构建环境

khusika commented 3 years ago

Describe the bug 描述你遇到的错误

输入 hugo server -D,会出现:

\content\posts\index.zh-cn.md:1:1": timed out initializing value. This is most likely a circular loop in a shortcode

这样的报错。请问是正常情况吗?

Screenshots 屏幕截图

图片

Build Environment 构建环境

  • OS: Windows 10
  • Theme version/commit [0.2.10, f787a4e]
  • Hugo version [v0.62.2-83E50184]

At the moment, Hugo using deprecated Instagram linked API endpoint.I would like to make a PR for this issue but this repo is dead. Read my article below this to fix those problem Instagram Shortcode in Hugo

sanbeichahegongheguo commented 3 years ago

重新安装后再次启动 Hugo,报错如下:

Built in 58988 ms Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: posts/single.html:85:140: executing "content" at <partial "function/content.html">: error calling partial: "C:\Users\time\Documents\MEGA\个人文章\myblog\themes\LoveIt\layouts\partials\function\content.html:4:19": execute of template failed: template: partials/function/content.html:4:19: executing "partials/function/content.html" at <partial "function/ruby.html" $content>: error calling partial: partial that returns a value needs a non-zero argument.

bearkchan commented 3 years ago

我也遇到了这个问题,请问有解决方法吗

sanbeichahegongheguo commented 3 years ago

我也遇到了这个问题,请问有解决方法吗

没有解决,不用这个主题,换别的了。有的theme也有这个问题, 不过也有没有这个问题的。我就用别的了。

bearkchan commented 3 years ago

嗯呢,我也换别的主题了,可能是因为hugo版本问题吧

uPagge commented 3 years ago

This project has been abandoned. I started to develop it further

https://github.com/uPagge/uBlogger/

pokitpeng commented 3 years ago

+1

wu-yue-yu commented 3 years ago

试试这篇文章中配置主题部分里面的,修改主题目录的那个方法,我之前也遇到了这个问题,后面解决了,具体方法我忘了。

pokitpeng commented 3 years ago

我通过降低hugo版本解决的

go get github.com/gohugoio/hugo@v0.69.0
henryken commented 3 years ago

It starts breaking from v0.75.0. v0.74.3 is the last version that works with the theme.

henryken commented 3 years ago

I think related to the change of partials behavior https://discourse.gohugo.io/t/error-with-partials-in-0-75-0/28184

wu-yue-yu commented 3 years ago

还有一个可能就是你的Markdown文章里面有语法错误或者是空文章。

sanbeichahegongheguo commented 3 years ago

还有一个可能就是你的Markdown文章里面有语法错误或者是空文章。

没错!事实上我发现其实是这个原因。具体到我自己是我把文章的时间设置的都不对,因为一些缘故我自己把一些文章设置为2022年。

biningo commented 3 years ago

出现这个错误大概率是md语法写错了,可以由一下几个方向去排错:

henryken commented 3 years ago

I've found the issue with my project. There's one md page which has an empty body. I added "\ " and it works now with the latest Hugo v0.83.1.

HuangNO1 commented 3 years ago

I've found the issue with my project. There's one md page which has an empty body. I added "\ " and it works now with the latest Hugo v0.83.1.

Yes! In fact, I encounter this same problem today, and it worked after adding "\ " in the files' bodies which are in the directory, "content/tags/". There are four md pages that we have to fix.

$ tree                     
.
├── configuration
│   └── _index.zh-cn.md
├── content
│   ├── _index.fr.md
│   └── _index.zh-cn.md
└── installation
    └── _index.zh-cn.md

For instance:

before

---
title: "configuration"
---

after

---
title: "configuration"
---
&nbsp;
whuwangyong commented 2 years ago

我用最新的hugo 0.92也没问题啊。建议先把自带的一些文章删除,有些文章里面包含了连接 twitter 等shortcode,在国内是连不上的,然后报timeout。

bwcxyk commented 2 years ago

是posts里面的内容有问题,全部删掉就行了。