HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.19k stars 2.9k forks source link

parse failed: template: partials/site_head.html:107: function "merge" not defined #1464

Closed ryanstraight closed 4 years ago

ryanstraight commented 4 years ago

Trying to update my site and I keep getting this error when running the hugo command or blogdown::build_site(). Using RStudio for this.

\academic-kickstart\themes\academic\layouts\partials\site_head.html:107:1": parse failed: emplate: partials/site_head.html:107: function "merge" not defined

Pulled the academic-kickstart submodule master version. Updated to hugo 0.60.1. Made all the breaking updates as far as I can tell.

Ideas?

Bertbk commented 4 years ago

Did you pull the submodule ?

git submodule update --init --recursive
ryanstraight commented 4 years ago

I used the instructions at https://sourcethemes.com/academic/docs/update/#if-you-installed-academic-kickstart:

git submodule update --remote --merge cd themes/academic git checkout <VERSION>

Should I be using that code, instead?

wenyalintw commented 4 years ago

same issue here

gcushen commented 4 years ago

Updated to hugo 0.60.1

Is your RStudio using the full version of Hugo v0.60.1, Hugo Extended? Likely it isn't using the right version of Hugo since it cannot find Hugo's merge function.

ryanstraight commented 4 years ago

Thanks, George. That fixed part of it! Seems like the hugo update command didn't take. I manually replaced hugo with the Extended version and that error no longer occurs.

Now I'm getting these using the hugo command and blogdown::build_site() times out.

Building sites …

ERROR 2019/12/09 15:04:36 Please set an email address for the contact form using the email parameter in params.toml. Otherwise, set email_form = 0 to disable the contact form.

_(I removed the email and set emailform to 0.)

ERROR 2019/12/09 15:04:39 render of "page" failed: execute of template failed: template: _default\single.html:5:5: executing "main" at <partial "page_header" .>: error calling partial: "\academic-kickstart\themes\academic\layouts\partials\page_header.html:50:20": execute of template failed: template: partials/page_header.html:50:20: executing "partials/page_header.html" at <$featured.Width>: error calling Width: *resources.genericResource is not an image

Error: Error building site: failed to render pages: render of "section" failed: execute of template failed: template: section\post.html:18:9: executing "main" at <partial "li_compact" .>: error calling partial: "\academic-kickstart\themes\academic\layouts\partials\li_compact.html:79:17": execute of template failed: template: partials/li_compact.html:79:17: executing "partials/li_compact.html" at <.Resize>: error calling Resize: *resources.genericResource is not an image

gcushen commented 4 years ago

The error appears to indicate that there's an issue with the featured images and/or the params you are attempting to set for them.

I'm closing this issue as it's not a bug but rather a question about your specific site and the upgrade process. For support, see https://github.com/gcushen/hugo-academic/blob/master/.github/support.md . It would also help if you share you repo there, so the community can attempt to help. Also, if you compare the latest demo site with your site, in particularly the front matter of files, it may help narrow down the issue more.

adalgu commented 4 years ago

I had same issue, but hard to solved with this thread.

Finally, I solved issue with changing hugo version from latest to hugo_extended:0.60.1.

For example, I changed my .gitlab-ci.yml as following.

<before> 
image: registry.gitlab.com/pages/hugo/hugo_extended:latest

<after>
image: registry.gitlab.com/pages/hugo/hugo_extended:0.60.1

I learned right Hugo Version is very critical!