0

I've followed the advice at https://bookdown.org/yihui/blogdown/static-files.html by adding a .r file with blogdown::build_dir('static') - and by creating a ./static/post directory - what am I missing?

I also searched through rbind.io blogdown structures, but cannot figure out how to connect rendered graphic outputs to static/post/post-date; not how to automatically redirect outputs to that folder instead of public.

Thanks for the help.

Corey Pembleton
  • 717
  • 9
  • 23
  • Generally you do not need to handle ggplot output **manually** in blogdown, because blogdown will render the output graphic, put int in static/post/some-where and correctly link it to your post. Could you provide your repo? – TC Zhang Jul 17 '18 at 00:14
  • In my local, the plot chunk images are generated in the public folder, but not pushed to the static. I think ive just made a mistake somewhere in changing folders https://github.com/pembletonc/blogdown.git – Corey Pembleton Jul 17 '18 at 01:15
  • This is the post, you can see the broken image links as well. http://coreypembleton.netlify.com/random/tidy-text-twitter/ – Corey Pembleton Jul 17 '18 at 01:33
  • I think I [found the problem](https://github.com/pembletonc/blogdown/blob/master/static/.gitignore) – TC Zhang Jul 17 '18 at 02:06

1 Answers1

1

I think I found the problem

The .gitignore file in your static directory prevents git to stage images generated by blogdown, delete it.

TC Zhang
  • 2,757
  • 1
  • 13
  • 19