Unable to create new site using (hugo) Academic theme

拜拜、爱过 提交于 2020-01-21 05:38:04

问题


I am new to blogdown and working my way through the fabulous resource to guide me. Unfortunately, I am unable to use the academic theme in hugo. To create a new site I have:

  1. Created a new (empty) project in a brand new working directory.
  2. Installed blogdown and hugo, as recommended
  3. Tried to create a new site by running the following:

    blogdown::new_site(theme = "gcushen/hugo-academic")

Unfortunately, I then encounter the following errors:

Error: Unable to find theme Directory: C:\Users\myusername\Documents\MyBlog\themes\academic

Error: Unable to find theme Directory: C:\Users\myusername\Documents\MyBlog\themes\academic

Error: Unable to find theme Directory: C:\Users\myusername\Documents\MyBlog\themes\academic

I also encounter the following:

Error in shell(cmd, mustWork = TRUE, intern = intern) : 
  '"C:\Users\myusername\AppData\Roaming\Hugo\hugo.exe" convert toYAML --unsafe' execution failed with error code 65535

Where am I going wrong? I also tried to use the guide on installing/ creating via RStudio but encountered the same issue. I am new to blogdown so would appreciate any assistance.

Thank you!

sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252    LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.17    bookdown_0.9    later_0.7.3     digest_0.6.15   rprojroot_1.3-2 R6_2.2.2        backports_1.1.2 magrittr_1.5    evaluate_0.10.1
[10] blogdown_0.10   stringi_1.1.7   promises_1.0.1  rstudioapi_0.7  rmarkdown_1.10  tools_3.5.2     stringr_1.3.1   httpuv_1.4.4.2  xfun_0.4       
[19] compiler_3.5.2  htmltools_0.3.6 knitr_1.20  

回答1:


This is due to a breaking change in the hugo-academic theme. I have fixed it in blogdown a few hours earlier. Please try the development version:

remotes::install_github('rstudio/blogdown')

Restart R and create a new site with this theme again.



来源:https://stackoverflow.com/questions/54300535/unable-to-create-new-site-using-hugo-academic-theme

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!