2017-02-14 49 views
2

我正在使用Rstudio的markdown軟件包創建網站。當我運行一個函數:在博客中安裝syui/hugo-theme-arch主題

blogdown::install_theme('syui/hugo-theme-arch',theme_example =TRUE) 

返回錯誤:

Error in find_config(): Cannot find the configuration file config.yaml or config.toml of the website

我的代碼是:

devtools::install_github('rstudio/blogdown') 
blogdown::install_hugo() 
blogdown::install_theme('syui/hugo-theme-arch',theme_example =TRUE) 
+0

您是否將工作目錄設置爲您網站的目錄?當'find_config()'抱怨時,可能是因爲它找不到* your *的配置文件,而不是主題。例如,如果您不在您的網站的wd中,並且您嘗試運行博客功能,它會給您這個錯誤。 – RobertMc

回答

3

我相信你需要先使用blogdown的new_site功能。我認爲它試圖更新一個尚不存在的配置文件,因爲install_theme函數有update_config參數,它的默認值爲TRUE。