I got frustrated with trying to get R html to show properly on my Wordpress.com blog as images dont show up at all in the blog. So I checked out Google Blogger and found no hassles there.
A step by step guide to create the following webpage
http://nevilleandrade.blogspot.de/2014/10/testing-r-using-google-blogger.html
The steps I followed were (Windows)
1. Open RStudio and create a new Rmd file.
2. Knit to html using either the button "Knit HTML" or run knit2html("yourRMD.Rmd") on command line.
3. Open the html file created using notepad, copy the contents.
4. Create a new post on Google blogger.
5. Switch to html composition mode.
6. You will find the following content in the beginning
<div dir="ltr" style="text-align: left;" trbidi="on">
</div>
Do not remove this stuff other wise the link to the blog gets funny rather than the actual name of the blog.
7. Put a title for the blog.
8. Paste the contents of point 3.
9. Preview and publish.
A step by step guide to create the following webpage
http://nevilleandrade.blogspot.de/2014/10/testing-r-using-google-blogger.html
The steps I followed were (Windows)
1. Open RStudio and create a new Rmd file.
2. Knit to html using either the button "Knit HTML" or run knit2html("yourRMD.Rmd") on command line.
3. Open the html file created using notepad, copy the contents.
4. Create a new post on Google blogger.
5. Switch to html composition mode.
6. You will find the following content in the beginning
<div dir="ltr" style="text-align: left;" trbidi="on">
</div>
Do not remove this stuff other wise the link to the blog gets funny rather than the actual name of the blog.
7. Put a title for the blog.
8. Paste the contents of point 3.
9. Preview and publish.
Neville, I just tried this with my blog and it works ... except the image isn't displayed correctly in preview. It appears when I publish, but then the background is all messed up. I don't see the div tag you mention at point #6 when I change to html mode. Maybe that's the source of the troubles.
ReplyDeleteThanks for putting this up.
Drew could you show me a link to the post where you have the background problem?
DeleteThe div tags appear only when you set html as default editor in blogger, unless google have changed their setup.
Neville, have you ever tried using Google APIs and googleAuthR to create posts automatically?
ReplyDeleteNo, but will try this out. Thanks.
Delete