Closed rajesh-s closed 5 years ago
Refer to the docs:
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
@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
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?
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
@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!
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.
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
Hi
I have Academic installed as a submodule
I upgraded this module using
After which I am able to see the themes folder modified with the new changes
However, when I try to build again using
$ hugo
I get the following error: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.