2017-09-25 6 views
1

blogdown: Creating Websites with R Markdown의 빠른 예를 사용하여 blogdown 및 hugo로 new_site를 설정하려고했습니다. 그러나, RStudio를 통해 생성 된 새로운 빈 프로젝트에서 new_site() 명령을 호출 한 후에 다음 오류가 발생했습니다. 오류 콜이 무엇인지에 대한 확신이 없기 때문에이 문제를 해결하는 데 많은 도움이됩니다.blogdown의 new_site가 편집기에서 오류를 발생시킵니다.

> 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 

빠른 예제 페이지에는 새 사이트가 RStudio 뷰어에 나타나야한다고 나와 있습니다. 그것은 발생하지 않습니다 (오류로 가정). 그러나 serve 사이트를 호출 한 후 페이지가 뷰어에 표시됩니다.()에서 new_post을 통해 새 게시물을 만들 때

> 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 

오류

는 트리거 : 새 게시물 콘텐츠/후 폴더에 나타납니다

> 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 

있지만.

문제를 해결하는 방법에 대해 제안 해 주셔서 감사합니다.

답변

2

최신 버전의 RStudio 추가 기능으로 업데이트하면 문제가 해결되었습니다. 이것은 Tools> Addins> New Post를 통해 "new_post"를 만들려고 할 때 RStudio에서 자동으로 실행됩니다. RStudio는 필요한 패키지를 자동으로 업데이트, 설치 및로드합니다. 이 경우

:

install.packages("miniUI") 
install.packages("rstudioapi") 
관련 문제