LoveIt icon indicating copy to clipboard operation
LoveIt copied to clipboard

"page" faile

Open jianguo888 opened this issue 3 years ago • 9 comments

ERROR 2021/08/03 22:04:26 render of "page" failed: execute of template failed: t emplate: posts/single.html:92:124: executing "content" at <partial "function/con tent.html">: error calling partial: "D:\2021workspace\hugo\blog\layouts\partials \function\content.html:15:15": execute of template failed: template: partials/fu nction/content.html:15:15: executing "partials/function/content.html" at <partia l "function/checkbox.html" $content>: error calling partial: partial that return s a value needs a non-zero argument.

jianguo888 avatar Aug 03 '21 14:08 jianguo888

我也遇到这个情况,麻烦作者解决,辛苦了,十分感谢

simpleKalvin avatar Sep 12 '21 08:09 simpleKalvin

M1 Macbook 下报同样的错,如果第一篇文章 draft 为 true 则不报错:

以下是我的软件版本,使用 git submodule add https://github.com/dillonzq/LoveIt.git themes/LoveIt 导入主题并配置。

songtianlun@Frytea-MacBook-Air quickstart % go version
go version go1.16.3 darwin/amd64
songtianlun@Frytea-MacBook-Air quickstart % hugo version
hugo v0.82.0+extended darwin/arm64 BuildDate=unknown

复现方法:

$ hugo new site quickstart
$ cd quickstart
$ git init
$ git submodule add https://github.com/dillonzq/LoveIt.git themes/LoveIt
# 将 config.toml 替换为 https://hugoloveit.com/zh-cn/theme-documentation-basics/ 给出的基本配置
$ hugo new posts/first_post.md
# draft 改为 false
$ hugo serve
# 报错

$ hugo serve
Start building sites …
WARN 2021/09/23 09:09:59

Current environment is "development". The "comment system", "CDN" and "fingerprint" will be disabled.
当前运行环境是 "development". "评论系统", "CDN" 和 "fingerprint" 不会启用.

Built in 46 ms
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: posts/single.html:92:124: executing "content" at <partial "function/content.html">: error calling partial: "/Users/songtianlun/Dev/quickstart/themes/LoveIt/layouts/partials/function/content.html:15:15": execute of template failed: template: partials/function/content.html:15:15: executing "partials/function/content.html" at <partial "function/checkbox.html" $content>: error calling partial: partial that returns a value needs a non-zero argument.

songtianlun avatar Sep 23 '21 01:09 songtianlun

是hugo版本的问题,我使用hugo最新版本0.88的会报这个错误。 我将版本回退到了0.69.2,再启动server就可以了。估计是没有适配Hugo最新版本吧

FushuWang avatar Oct 26 '21 11:10 FushuWang

谢谢,如何锁定版本

------------------ 原始邮件 ------------------ 发件人: "dillonzq/LoveIt" @.>; 发送时间: 2021年10月26日(星期二) 晚上7:01 @.>; @.@.>; 主题: Re: [dillonzq/LoveIt] "page" faile (#616)

是hugo版本的问题,我使用hugo最新版本0.88的会报这个错误。 我将版本回退到了0.69.2,再启动server就可以了。估计是没有适配Hugo最新版本吧

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

jianguo888 avatar Oct 26 '21 11:10 jianguo888

谢谢,如何锁定版本 ------------------ 原始邮件 ------------------ 发件人: "dillonzq/LoveIt" @.>; 发送时间: 2021年10月26日(星期二) 晚上7:01 @.>; @.@.>; 主题: Re: [dillonzq/LoveIt] "page" faile (#616) 是hugo版本的问题,我使用hugo最新版本0.88的会报这个错误。 我将版本回退到了0.69.2,再启动server就可以了。估计是没有适配Hugo最新版本吧 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

锁定啥版本?

FushuWang avatar Oct 26 '21 11:10 FushuWang

将hugo版本回退到你说的这个版本

------------------ 原始邮件 ------------------ 发件人: "dillonzq/LoveIt" @.>; 发送时间: 2021年10月26日(星期二) 晚上7:15 @.>; @.@.>; 主题: Re: [dillonzq/LoveIt] "page" faile (#616)

谢谢,如何锁定版本 … ------------------ 原始邮件 ------------------ 发件人: "dillonzq/LoveIt" @.>; 发送时间: 2021年10月26日(星期二) 晚上7:01 @.>; @.@.>; 主题: Re: [dillonzq/LoveIt] "page" faile (#616) 是hugo版本的问题,我使用hugo最新版本0.88的会报这个错误。 我将版本回退到了0.69.2,再启动server就可以了。估计是没有适配Hugo最新版本吧 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

锁定啥版本?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

jianguo888 avatar Oct 26 '21 11:10 jianguo888

将hugo版本回退到你说的这个版本 ------------------ 原始邮件 ------------------ 发件人: "dillonzq/LoveIt" @.>; 发送时间: 2021年10月26日(星期二) 晚上7:15 @.>; @.@.>; 主题: Re: [dillonzq/LoveIt] "page" faile (#616) 谢谢,如何锁定版本 … ------------------ 原始邮件 ------------------ 发件人: "dillonzq/LoveIt" @.>; 发送时间: 2021年10月26日(星期二) 晚上7:01 @.>; @.@.>; 主题: Re: [dillonzq/LoveIt] "page" faile (#616) 是hugo版本的问题,我使用hugo最新版本0.88的会报这个错误。 我将版本回退到了0.69.2,再启动server就可以了。估计是没有适配Hugo最新版本吧 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. 锁定啥版本? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

去release下载对应版本的包就可以,你还可以继续试试看看最高兼容到哪个版本。

FushuWang avatar Oct 26 '21 11:10 FushuWang

好的,谢谢你的耐心解答

------------------ 原始邮件 ------------------ 发件人: "dillonzq/LoveIt" @.>; 发送时间: 2021年10月26日(星期二) 晚上7:35 @.>; @.@.>; 主题: Re: [dillonzq/LoveIt] "page" faile (#616)

将hugo版本回退到你说的这个版本 … ------------------ 原始邮件 ------------------ 发件人: "dillonzq/LoveIt" @.>; 发送时间: 2021年10月26日(星期二) 晚上7:15 @.>; @.@.>; 主题: Re: [dillonzq/LoveIt] "page" faile (#616) 谢谢,如何锁定版本 … ------------------ 原始邮件 ------------------ 发件人: "dillonzq/LoveIt" @.>; 发送时间: 2021年10月26日(星期二) 晚上7:01 @.>; @.@.>; 主题: Re: [dillonzq/LoveIt] "page" faile (#616) 是hugo版本的问题,我使用hugo最新版本0.88的会报这个错误。 我将版本回退到了0.69.2,再启动server就可以了。估计是没有适配Hugo最新版本吧 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. 锁定啥版本? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

去release下载对应版本的包就可以,你还可以继续试试看看最高兼容到哪个版本。

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

jianguo888 avatar Oct 26 '21 11:10 jianguo888

好的,谢谢你的耐心解答 ------------------ 原始邮件 ------------------ 发件人: "dillonzq/LoveIt" @.>; 发送时间: 2021年10月26日(星期二) 晚上7:35 @.>; @.@.>; 主题: Re: [dillonzq/LoveIt] "page" faile (#616) 将hugo版本回退到你说的这个版本 … ------------------ 原始邮件 ------------------ 发件人: "dillonzq/LoveIt" @.>; 发送时间: 2021年10月26日(星期二) 晚上7:15 @.>; @.@.>; 主题: Re: [dillonzq/LoveIt] "page" faile (#616) 谢谢,如何锁定版本 … ------------------ 原始邮件 ------------------ 发件人: "dillonzq/LoveIt" @.>; 发送时间: 2021年10月26日(星期二) 晚上7:01 @.>; @.@.>; 主题: Re: [dillonzq/LoveIt] "page" faile (#616) 是hugo版本的问题,我使用hugo最新版本0.88的会报这个错误。 我将版本回退到了0.69.2,再启动server就可以了。估计是没有适配Hugo最新版本吧 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. 锁定啥版本? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. 去release下载对应版本的包就可以,你还可以继续试试看看最高兼容到哪个版本。 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

https://github.com/dillonzq/LoveIt/issues/518 这个issues里有提及最高到0.74

FushuWang avatar Oct 26 '21 11:10 FushuWang