blogdown::new_site() bash 未在 win7 上找到

blogdown::new_site() bash not found on win7

总结:bash 未在 win7 上找到(git bash 可用)

blogdown::new_site(theme = "yihui/hugo-xmin")

恭喜!您的新 Hugo 站点已在 C:\Users\John\repos\openemr-blog3.

中创建

只需再执行几步即可开始:

  1. 将主题下载到同名文件夹中。 从 https://themes.gohugo.io/ 中选择一个主题,或者 使用 "hugo new theme " 命令创建您自己的。
  2. 也许您想添加一些内容。您可以添加单个文件 "hugo new \.".
  3. 通过"hugo server"启动built-in实时服务器。

访问 https://gohugo.io/ 获取 quickstart guide 和完整文档。 尝试 URL 'https://github.com/yihui/hugo-xmin/archive/master.zip' 内容类型 'application/zip' 长度 78899 字节 (77 KB) 下载 77 KB

渲染content/_index.Rmarkdown 运行: bash -c "cd ../..; 寻找 。 -not -path '/exampleSite/' ( -name '.html' -o -name '.css' ) | xargs wc -l

Qui从第 14-16 行开始调整 (_index.Rmarkdown) system2(cmd, code, stdout = TRUE, stderr = TRUE, env = options$engine.env) 错误: 未找到“"bash"” 调用:local ... tryCatch -> tryCatchList -> tryCatchOne -> 执行暂停 运行 命令 '"C:/PROGRA~1/R/R-34~1.1/bin/x64/Rscript" "C:/Users/John/Documents/R/win-library/3.4/blogdown/scripts/render_page.R" “_index.Rmarkdown” "C:/Users/John/repos/openemr-blog3/content"' 在 render_page(f) 中的状态为 1Error :无法呈现 '_index.Rmarkdown' [1] 正确 /usr/bin/sed: 无法读取:没有那个文件或目录 警告信息: 运行 命令 'sed -i '' -e '1,6d' -e '34,38d' ../README.md' 有状态 2

devtools::session_info()

会话信息----------------------------------------

设置值
版本 R 版本 3.4.1 (2017-06-30) 系统 x86_64, mingw32
ui RStudio (1.0.153)
语言 (EN)
整理 English_United States.1252
tzAmerica/New_York
日期 2017-09-15

包----------------------------------------

包 * 版本日期来源
向后移植 1.1.0 2017-05-22 CRAN (R 3.4.0)
基础 * 3.4.1 2017-06-30 本地
博客下载 * 0.1.4 2017-09-15 Github (rstudio/blogdown@ec651e1) bookdown 0.5 2017-08-20 CRAN (R 3.4.1)
编译器 3.4.1 2017-06-30 本地
数据集 * 3.4.1 2017-06-30 本地
devtools 1.13.3 2017-08-02 CRAN (R 3.4.1)
摘要 0.6.12 2017-01-27 CRAN (R 3.4.0)
评估 0.10.1 2017-06-24 CRAN (R 3.4.1)
图形 * 3.4.1 2017-06-30 本地
grDevices * 3.4.1 2017-06-30 本地
html工具 0.3.6 2017-04-28 CRAN (R 3.4.0)
knitr 1.17 2017-08-10 CRAN (R 3.4.1)
magrittr 1.5 2014-11-22 CRAN (R 3.4.0)
备忘录 1.1.0 2017-04-21 CRAN (R 3.4.0)
方法 * 3.4.1 2017-06-30 本地
Rcpp 0.12.12 2017-07-15 CRAN (R 3.4.1)
rmarkdown 1.6 2017-06-15 CRAN (R 3.4.1)
rprojroot 1.2 2017-01-16 CRAN (R 3.4.0)
rstudioapi 0.7 2017-09-07 CRAN (R 3.4.1)
统计 * 3.4.1 2017-06-30 本地
stringi 1.1.5 2017-04-07 CRAN (R 3.4.0)
stringr 1.2.0 2017-02-18 CRAN (R 3.4.0)
工具 3.4.1 2017-06-30 本地
实用程序 * 3.4.1 2017-06-30 本地
withr 2.0.0 2017-08-10 Github (jimhester/withr@190d293) yaml 2.1.14 2016-11-12 CRAN (R 3.4.0)

这是一个关于这个特定主题的 windows 问题 (win7)。 运行 new_site() 使用默认主题效果很好。

问题出自该主题提供的示例站点。具体来说,content/_index.Rmarkdown 中的 bash 代码块(这对您作为主题的最终用户没有用)。在您的网站项目中打开此文件,然后删除 bash 代码块。那么你应该准备好了。