Lately I’ve had the problem that ggplot2-plots were missing in my blogdown-posts.

I discovered that this problem only occurs when I used .Rmarkdown instead of .Rmd.

Going back to .Rmd was no option because I want to use syntax highlighting for the embedded R-code (see my article).

After some googling I found with the solution to add

  unsafe= true

in the file config.toml.

So far, so good.

Now I’ve updated several packages, including blogdown – and guess what, the plots were gone again.

This time I read the release notes and found the solution.

Blogdown create for each new article a new directory by default. Therefor I had “Consequently, not ignore “_files$” in the ignoreFiles field in your config.toml or config.yaml any more.”

I also found a great article by Alison Hill.

It describes some functions to check your blogdown installation, such as:

  • check_config()
  • check_gitignore()
  • check_hugo()
  • check_content()
  • check_netlify()

Good to know!