Zhenguo Zhang's Blog
Sharing makes life better
[R] What if plots don't show up in blogdown webpage?

Recently I found that the plots generated by R don’t show up in the webpage when I blogdown::serve_site() locally or at netlify.app. A quick google search gave me the following two solutions:

  • Modify the file config.toml to remove the pattern _files$ from the ignoreFiles list.

  • Add the option fig.path=some/folder in knitr::opts_chunk$set().

The first one is recommended by Yihui.

For more details, see the following pages:

😄 Happy programming!


Last modified on 2023-05-27

Comments powered by Disqus