【发布时间】:2022-01-17 14:01:50
【问题描述】:
我正在尝试使用new_post_addin() 创建新帖子。
然后我得到了:
> Listening on [http://127.0.0.1:6651](http://127.0.0.1:6651/)
Warning in file(con, "r") :
cannot open file 'Content "C:\\Users\\82103\\Desktop\\ssangblog\\content\\post\\2021-12-14-1234\\index.md"/index.md': Invalid argument
Warning: Error in file: cannot open the connection
> 9: shiny::runApp
> 8: shiny::runGadget
> 7: eval
> 6: eval
> 5: sys.source
> 2: source_addin
> 1: blogdown:::new_post_addin
>
首先,文件目录有些奇怪:
'Content "C:\\Users\\82103\\Desktop\\ssangblog\\content\\post\\2021-12-14-234\\index.md"/index.md'
我不知道为什么会有'双反斜杠'和两个'index.md'和'Content "~"'。 我只是觉得处理文件目录的代码一定有错误。
其次,在内容文件夹中创建的唯一文件是 index.md,其中我输入的标签没有正确输入。 我还创建了 R markdown,为什么是 '.md'... index.md
这可能是源于第一个问题。
为了解决我的问题,我参考了以下网址。
https://www.py4u.net/discuss/896387
https://d.cosx.org/d/422702-blogdownnew-post-addin
我找不到根本的解决方案,唯一的答案是通过更新来修复它。
我参考了下面的 url 来检查回溯错误发生在哪里。
-
新闻调试博客 https://github.com/rstudio/blogdown/blob/main/NEWS.md
-
查看new_post_addin、source_addin https://github.com/rstudio/blogdown/blob/a555322e2ca1ec66ac37dd706720180284760210/R/addin.R
-
new_post.R https://github.com/rstudio/blogdown/blame/main/inst/scripts/new_post.R
通过查看它们,我意识到这超出了我的能力范围。
【问题讨论】: