Reputation: 683
I've been trying to set up new_site with blogdown and hugo using the quick example from blogdown: Creating Websites with R Markdown; however, after calling new_site() command in a new empty project created via RStudio I have got the following error. I am not really sure what the error call is based upon so any help solving this is much appreciated.
> new_site()
Congratulations! Your new Hugo site is created in C:\Users\XYZ\Downloads\Test2\Site.
Just a few more steps and you're ready to go:
1. Download a theme into the same-named folder.
Choose a theme from https://themes.gohugo.io/, or
create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
with "hugo new <SECTIONNAME>\<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".
Visit https://gohugo.io/ for quickstart guide and full documentation.
trying URL 'https://github.com/yihui/hugo-lithium-theme/archive/master.zip'
Content type 'application/zip' length 119078 bytes (116 KB)
downloaded 116 KB
Error in editor(file = file, title = title) :
argument "name" is missing, with no default
The quick example page states that the new site should appear in RStudio viewer. That doesn't happen (assume due to the error). However, after calling serve site, the page does appear in viewer.
> serve_site()
Rendering content/post/2015-07-23-r-rmarkdown.Rmd
Started building sites ...
Built site for language en:
0 draft content
0 future content
0 expired content
4 regular pages created
16 other pages created
0 non-page files copied
0 paginator pages created
3 tags created
1 categories created
total in 34 ms
Serving the directory C:\Users\XYZ\Downloads\Test2\Site at http://BLABLA
The error is also triggered when creating new post through new_post():
> new_post("MyTest")
C:\Users\XYZ\Downloads\Test2\Site\content\post\2017-09-25-mytest.md created
Error in editor(file = file, title = title) :
argument "name" is missing, with no default
Although new post appears in content/post folder.
Thank you for any suggestions how to solve it.
Upvotes: 1
Views: 518
Reputation: 683
The issue was solved by updating to latest version of RStudio's addins. This is triggered automatically from RStudio when you try to create "new_post" through "Tools > Addins > New Post". The RStudio will automatically update, install and load required packages.
In this case:
install.packages("miniUI")
install.packages("rstudioapi")
Upvotes: 2