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.28k stars 2.91k forks source link

Issues with building after upgrading to v4.1.0 #962

Closed rajesh-s closed 5 years ago

rajesh-s commented 5 years ago

Hi

I have Academic installed as a submodule

Submodule 'themes/academic' (https://github.com/gcushen/hugo-academic.git) registered for path 'themes/academic'

I upgraded this module using

git submodule update --remote --merge

After which I am able to see the themes folder modified with the new changes

modified: themes/academic (new commits)

However, when I try to build again using $ hugo I get the following error:

Total in 24 ms Error: Error building site: failed to render pages: render of "home" failed: execute of template failed: template: index.html:4:3: executing "index.html" at <partial "widget_page...>: error calling partial: "themes/academic/layouts/partials/widget_page.html:51:9": execute of template failed: template: partials/widget_page.html:51:9: executing "partials/widget_page.html" at <partial $widget_path...>: error calling partial: Partial "widgets/publications_featured.html" not found

I am able to build and run the server (using hugo server -D) before this upgrade process.

Am I missing something? Thanks for your time

Regards.

gcushen commented 5 years ago

Refer to the docs:

jananiravi commented 5 years ago

hi @gcushen, I updated from v3.3 to v4.1 (by downloading the zipped file) taking care of all the breaking changes one jump at a time.

I still see the following errors when I run blogdown::build_site() -- something to do with partial layouts. Any suggestions as to what needs to be fixed & where?

Thanks!

Error: Error building site: failed to render pages: render of "page" failed: "/Users/janani/Google_Drive/GitHub/jananiravi-webpage/themes/hugo-academic/layouts/_default/single.html:22:34": execute of template failed: template: _default/single.html:6:5: executing "_default/single.html" at <partial "page_header.html" .>: error calling partial: "/Users/janani/Google_Drive/GitHub/jananiravi-webpage/themes/hugo-academic/layouts/partials/page_header.html:22:34": execute of template failed: template: partials/page_header.html:92:7: executing "partials/page_header.html" at <partial "page_metadata" (dict "content" $page "is_list" 0 "share" true)>: error calling partial: "/Users/janani/Google_Drive/GitHub/jananiravi-webpage/themes/hugo-academic/layouts/partials/page_metadata.html:22:34": execute of template failed: template: partials/page_metadata.html:22:34: executing "partials/page_metadata.html" at <$.Site.Params.date_format>: invalid value; expected string

gcushen commented 5 years ago

@jananiravi that Hugo error implies that your site config has not been upgraded - refer to the example site for v4.1: https://github.com/gcushen/hugo-academic/tree/v4.1.0/exampleSite

Also refer to the installation guide RE handling a Blogdown bug that may still exist:

Workaround a Blogdown bug by moving config/_default/config.toml to config.toml at your project root

jananiravi commented 5 years ago

That's how I have it, @gcushen I split my config.toml (which is now config_old.toml, that I assume hugo/blogdown would ignore) into 4 files as suggested in the example site. https://github.com/jananiravi/jananiravi-webpage

Is that not the right location -- the project home?

jananiravi commented 5 years ago

Content source: https://github.com/jananiravi/jananiravi-webpage

@gcushen, here's the full version of the errors in case this is more informative: Starts with the Hugo warnings mentioned here:

Building sites … WARN 2019/04/15 14:03:29 Page's .Hugo is deprecated and will be removed in a future release. Use the global hugo function. WARN 2019/04/15 14:03:29 Page's .RSSLink is deprecated and will be removed in a future release. Use the Output Format's link, e.g. something like: {{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}. ERROR 2019/04/15 14:03:29 Please complete the installation of Academic by following the steps at https://sourcethemes.com/academic/docs/install/ WARN 2019/04/15 14:03:29 Page's .Dir is deprecated and will be removed in a future release. Use .File.Dir. ERROR 2019/04/15 14:03:29 render of "home" failed: execute of template failed: template: index.html:4:3: executing "index.html" at <partial "widget_page.html" .>: error calling partial: "/Users/janani/Google_Drive/GitHub/jananiravi-webpage/themes/hugo-academic/layouts/partials/widget_page.html:22:34": execute of template failed: template: partials/widget_page.html:65:9: executing "partials/widget_page.html" at <partial $widget_path $params>: error calling partial: "/Users/janani/Google_Drive/GitHub/jananiravi-webpage/themes/hugo-academic/layouts/partials/widgets/pages.html:22:34": execute of template failed: template: partials/widgets/pages.html:85:11: executing "partials/widgets/pages.html" at <partial "li_compact" .>: error calling partial: "/Users/janani/Google_Drive/GitHub/jananiravi-webpage/themes/hugo-academic/layouts/partials/li_compact.html:22:34": execute of template failed: template: partials/li_compact.html:69:11: executing "partials/li_compact.html" at <partial "page_metadata" (dict "content" $item "is_list" 1)>: error calling partial: "/Users/janani/Google_Drive/GitHub/jananiravi-webpage/themes/hugo-academic/layouts/partials/page_metadata.html:22:34": execute of template failed: template: partials/page_metadata.html:22:34: executing "partials/page_metadata.html" at <$.Site.Params.date_format>: invalid value; expected string ERROR 2019/04/15 14:03:29 render of "section" failed: execute of template failed: template: section/talk.html:27:17: executing "section/talk.html" at <partial "li_compact" .>: error calling partial: "/Users/janani/Google_Drive/GitHub/jananiravi-webpage/themes/hugo-academic/layouts/partials/li_compact.html:49:34": execute of template failed: template: partials/li_compact.html:49:34: executing "partials/li_compact.html" at <$.Site.Params.date_format>: invalid value; expected string ERROR 2019/04/15 14:03:29 render of "page" failed: "/Users/janani/Google_Drive/GitHub/jananiravi-webpage/themes/hugo-academic/layouts/talk/single.html:23:36": execute of template failed: template: talk/single.html:23:36: executing "talk/single.html" at <$.Site.Params.date_format>: invalid value; expected string ERROR 2019/04/15 14:03:29 render of "page" failed: "/Users/janani/Google_Drive/GitHub/jananiravi-webpage/themes/hugo-academic/layouts/talk/single.html:23:36": execute of template failed: template: talk/single.html:23:36: executing "talk/single.html" at <$.Site.Params.date_format>: invalid value; expected string Total in 2054 ms

jananiravi commented 5 years ago

@gcushen any suggestions? Or is it better to make the remaining breaking changes and move on to the more recent version dev v4.3? Thanks!

gcushen commented 5 years ago

As above, you are missing the config folder - the folder is required and it's only the config.toml file that should be moved to the root of the site due to the Blogdown bug, not the other files. Also you have an old config toml file which Hugo might try to load. Follow the upgrade instructions and compare your site with the demo site for that version which can be found in your themes/hugo-academic/exampleSite/ folder.

gcushen commented 5 years ago

Also you are trying to use an incompatible version of Hugo. The supported version of Hugo for your version of Academic can be found as min_version in themes/hugo-academic/theme.toml