如何解决Livereload/serve_site 仅适用于默认的 blogdown 主题 Hugo-lithium
编辑:在调查问题后,我简化了这个问题。
这个问题是,对于除 Hugo-lithium 之外的所有主题,对站点的更改都不会在查看器窗格或扩展窗口中刷新,除非我重新启动 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
解决方法
哇我终于可以回答这个了!事实证明,将我的工作目录放在 google 驱动器中是问题所在。因为它适用于 Hugo-lithium,所以我没有想到。我不知道为什么 Hugo-lithuim 有效而其他人却没有。希望这有助于其他可能遇到相同问题的人。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。