Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Livereload/serve_站点仅在默认博客主题hugo Limition中工作_R_Hugo_Blogdown - Fatal编程技术网

Livereload/serve_站点仅在默认博客主题hugo Limition中工作

Livereload/serve_站点仅在默认博客主题hugo Limition中工作,r,hugo,blogdown,R,Hugo,Blogdown,编辑:在研究了这个问题之后,我简化了这个问题 这个问题是,对于所有主题(hugo Limition除外),除非我重新启动r studio会话并为站点提供服务,否则对站点的更改不会在查看器窗格或扩展窗口中刷新。使用详细设置,命令窗口在编织后不显示内容渲染。我相信渲染是在重新启动时进行的,但是命令窗口关闭了,所以我没有文档。重新启动和服务需要一秒钟的时间,因此我正在考虑使用此解决方案,以便可以使用我想要的主题 R version 4.0.5 (2021-03-31) Platform: x86_64

编辑:在研究了这个问题之后,我简化了这个问题

这个问题是,对于所有主题(hugo Limition除外),除非我重新启动r studio会话并为站点提供服务,否则对站点的更改不会在查看器窗格或扩展窗口中刷新。使用详细设置,命令窗口在编织后不显示内容渲染。我相信渲染是在重新启动时进行的,但是命令窗口关闭了,所以我没有文档。重新启动和服务需要一秒钟的时间,因此我正在考虑使用此解决方案,以便可以使用我想要的主题

R version 4.0.5 (2021-03-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

 check_site()
― Running a series of automated checks for your blogdown website project...
-------------------------------------------------------------------------------
○ A successful check looks like this.
● [TODO] A check that needs your attention looks like this.
| Let's check out your blogdown site!
-------------------------------------------------------------------------------
― Checking config.yaml
| Checking "baseURL" setting for Hugo...
○ Found baseURL = ""; nothing to do here!
| Checking "ignoreFiles" setting for Hugo...
● [TODO] Add these items to the "ignoreFiles" setting: "\\.knit\\.md$", "\\.utf8\\.md$"
| Checking setting for Hugo's Markdown renderer...
○ All set! Found the "unsafe" setting for goldmark.
― Check complete: config.yaml

― Checking .gitignore
| Checking for items to remove...
○ Nothing to see here - found no items to remove.
| Checking for items to change...
○ Nothing to see here - found no items to change.
| Checking for items you can safely ignore...
● [TODO] You can safely add to .gitignore: .DS_Store, Thumbs.db
| Checking for items to ignore if you build the site on Netlify...
● [TODO] When Netlify builds your site, you can safely add to .gitignore: /public/, /resources/
| Checking for files required by blogdown but not committed...
● [TODO] Found 1 file that should be committed in GIT:

  layouts/shortcodes/blogdown/postref.html
― Check complete: .gitignore

― Checking Hugo
| Checking Hugo version...
○ Found Hugo. You are using Hugo 0.81.0.
| Checking .Rprofile for Hugo version used by blogdown...
| Hugo version not set in .Rprofile.
● [TODO] Set options(blogdown.hugo.version = "0.81.0") in .Rprofile and restart R.
― Check complete: Hugo

― Checking netlify.toml...
○ Found HUGO_VERSION = 0.81.0 in [build] context of netlify.toml.
| Checking that Netlify & local Hugo versions match...
○ It's a match! Blogdown and Netlify are using the same Hugo version (0.81.0).
| Checking that Netlify & local Hugo publish directories match...
○ Good to go - blogdown and Netlify are using the same publish directory: public
― Check complete: netlify.toml

― Checking content files
| Checking for validity of YAML metadata in posts...
○ All YAML metadata appears to be syntactically valid.
| Checking for previewed content that will not be published...
● [TODO] Found 1 file with a future publish date:

  content/event/example/index.md

  If you want to publish today, change a file's YAML key to 'date: 2021-03-25'
● [TODO] Found 2 files marked as drafts. To un-draft, run the command:

  blogdown::edit_draft(c(
  "content/privacy.md",
  "content/terms.md"
  ))

  and change a file's YAML from 'draft: true' to 'draft: false' or delete it
| Checking your R Markdown content...
○ All R Markdown files have been knitted.
○ All R Markdown output files are up to date with their source files.
| Checking for .html/.md files to clean up...
○ Found 0 duplicate .html output files.
○ Found 0 incompatible .html files to clean up.
| Checking for the unnecessary 'content/' directory in theme...
○ Great! Your theme does not contain the content/ directory.
― Check complete: Content

哇,我终于可以回答这个问题了!事实证明,将我的工作目录放在谷歌硬盘中是个问题。因为它对雨果锂电池有效,所以我没有想到它。我不知道为什么雨果·利特维姆能工作,而其他人却不能。希望这能帮助其他可能遇到同样问题的人。

我无法重现这个问题。在为网站提供服务之前,您能否设置选项(blogdown.server.verbose=TRUE)?然后你应该会看到更多的日志(在一个单独的命令窗口中,比如在你修改并保存一个文件时,某个文件就被修改了)。看起来这些更改实际上已经实现了,但只有在我关闭并重新启动Rstudio之后。但是,对于默认主题,更改是实时实现的,命令窗口反映了这一点。