rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.73k stars 335 forks source link

new_site() taxonomy error #57

Closed G-Thomson closed 7 years ago

G-Thomson commented 7 years ago

I have successfully used blogdown a couple of times to create some simple sites however today when I try to generate a new site I get the following errors:

 > blogdown::new_site()
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0100   129    0   129    0     0    132      0 --:--:-- --:--:-- --:--:--   132
  0  115k    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0100  115k  100  115k    0     0  44172      0  0:00:02  0:00:02 --:--:--  187k
Started building sites ...
ERROR: 2017/02/19 12:03:30 template.go:132: template: theme/partials/head_highlightjs.html:1:54: executing "theme/partials/head_highlightjs.html" at <.Content>: can't evaluate field Content in type *hugolib.Node in theme/partials/head_highlightjs.html
ERROR: 2017/02/19 12:03:30 general.go:212: Error while rendering taxonomy tag: template: theme/_default/list.html:5:20: executing "theme/_default/list.html" at <.Content>: can't evaluate field Content in type *hugolib.Node

Also a markdown file called 2015-07-23-r-rmarkdown.Rmd opens which is not the default intro to blogdown I remember from previous times i've tried this.

This suggests to me that the problem is not the function or package per se but a problem with the default template new_site() implements. Is anyone else having this problem?

yihui commented 7 years ago

Perhaps you are using an old version of Hugo? Check if blogdown::hugo_cmd('version') is 0.18.1; if not, try blogdown::install_hugo(force = TRUE).

G-Thomson commented 7 years ago

Great, thank you!. You are right it was the version of Hugo as I was running 0.17

blogdown::new_site() works fine now.

It might be helpful in the future but I am ruunung the Arch Linux distribution Antergos and when I called 'blogdown::install_hugo(force = TRUE)' R installed it to my home directory /home/gthomson/bin but when I called blogdown::hugo_cmd('version') R looked in /usr/bin/hugo for it.

I ended up manually uninstalling Hugo and then reinstalling it manually from the AUR repository which worked.

yihui commented 7 years ago

Yeah, if you have installed Hugo to /usr/bin, blogdown will first look there. Perhaps I should inspect $HOME/bin first. Thanks for the feedback!

statkclee commented 7 years ago

I've got the following error... such that I could deploy my blog to netlify.

> blogdown::hugo_cmd('version')
Hugo Static Site Generator v0.27 windows/amd64 BuildDate: 2017-09-12T10:08:14+09:00`
----------------------------------------------------------------------------------------------------
10:38:09 AM: Computing checksum with sha256sum
10:38:09 AM: Checksums matched!
10:38:09 AM: Now using node v6.11.3 (npm v3.10.10)
10:38:09 AM: Using version v6.11.3 of node
10:38:09 AM: Using /opt/buildhome/.rvm/gems/ruby-2.1.2
10:38:09 AM: Started building sites ...
10:38:09 AM: ERROR: 2017/09/13 01:37:54 template.go:132: template: theme/partials/head_highlightjs.html:1:54: executing "theme/partials/head_highlightjs.html" at <.Content>: can't evaluate field Content in type *hugolib.Node in theme/partials/head_highlightjs.html
10:38:09 AM: ERROR: 2017/09/13 01:37:54 general.go:212: Error while rendering taxonomy tag: template: theme/_default/list.html:5:20: executing "theme/_default/list.html" at <.Content>: can't evaluate field Content in type *hugolib.Node
yihui commented 7 years ago

@statkclee You have the latest version of Hugo locally, but I think the version of Hugo you specified on Netlify was too old. If you didn't specify the version there, the default will be 0.17 or so. Please see https://bookdown.org/yihui/blogdown/netlify.html

statkclee commented 7 years ago

I've figured it out... https://xwmooc.netlify.com/ I tried so many things at one time, but I guess that one of the main problem was "languageCode = "en-us"... Initially, I changed from "en-us" to "ko-kr".