关于Blogdown:无法使用(hugo)学术主题创建新网站

Unable to create new site using (hugo) Academic theme

我是不熟悉Blogdown的人,并且通过神话般的资源来指导我。不幸的是,我无法在雨果中使用学术主题。要创建一个新站点,我需要:

  • 在全新的工作目录中创建了一个新的(空)项目。
  • 根据建议安装了blogdown和hugo
  • 尝试通过运行以下命令来创建新站点:

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

  • 不幸的是,我随后遇到以下错误:

    1
    2
    3
    4
    5
    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

    我还遇到以下问题:

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

    我要去哪里错了?我也尝试使用该指南通过RStudio进行安装/创建,但是遇到了同样的问题。我是不熟悉Blogdown的人,因此将不胜感激。

    谢谢!

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    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


    这是由于雨果学术主题的重大变化。几个小时前,我已在Blogdown中修复了该问题。请尝试开发版本:

    1
    remotes::install_github('rstudio/blogdown')

    重新启动R并再次使用该主题创建一个新站点。