Moving the blog
I moved my blog! Not just in terms of where it’s hosted, but how the whole thing is built. Previously I’d been using ghost, which was fine up until the moment I wanted to publish more code/analysis. The process of copy-pasting code and exporting images was taking more time than writing the code itself.
I’m now using the blogdown
package which builds static websites within RStudio
using Hugo and lets you publish the results. The key thing being that you can
publish an R notebook directly from the console where the analysis is written,
while blogdown
does all the hard (boring) work. I went for the
GitHub -> Netlify route to
publishing, as recommended by blogdown
creator Yihui
Xie. Given that I have only the vaguest of
notions about how all that works, it was surprisingly straight forward to set up
thanks to really excellent documentation. I’m currently using the
tranquilpeak Hugo theme
and using a sub-domain of the lab website to point to Netlify. This also forced
me to learn to interact with GitHub more sensibly, which has been on my to do
list for about five years - better late than never :)
Handy resources if you’re looking to do the same:
- The blog down book by Yihui Xei et al., blogdown: Creating Websites with R Markdown
- Jenny Bryan’s intro to GitHub book, Happy Git and GitHub for the useR
The only gotcha I encountered: the automatically generated .Icon file created by OSX in any new folder halted compilation when I initially rendered my website locally. This was easily fixed by deleting the file.
edited to add
I added syntax highlighting to the theme (12th June 2019) using this very helpful guide