On Relocating to Github/Netlify
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Deep, labored breathing
Hello everyone, this is the opening post on my new blog, which I’m relocating from WordPress to GitHub Pages and Netlify. It’s so nice I’ve given it a name – because nice things have names!
But, why was I panting? The relocation effort wasn’t easy. Why did I follow through with it? Becuase it is worth the effort. This post is evidence of my victory. Now please, let me explain.
A few months ago, when I explored options for creating a blog to help me keep track of my learning, and to display my progress (and creativity) to the world, I decided on WordPress. It was convenient, quick to set up, and easy to forget about.
But WordPress didn’t:
- Display R code very well.
- Highlight or display code in code blocks.
- Provide exposure.
The main purpose of a blog is to be seen, but my page at WordPress was more of a hideout than a open facing space. I did some googling and found Blogdown. It is great, but in all honesty, migrating over was a struggle. I tried this process, but ultimately found this You Tube tutorial the best. The general workflow was
Create GitHub account and Repo
Create new R Version Control Project (same name as repo I think)
Use
blogdown::new_site(theme = "")
to create a new site in R, and edit the config.toml file to change up some of the blog paramaters to your liking.Use
blogdown::build_site
Commit/push to GitHub, then point to Netlify. (You’ll need to edit settings for repo to be a GitHub Page, for more details refer to John Muschelli’s tutorial on You Tube.)
Now, it was all definitely FRUSTRATING. I had no experience with GitHub and found it very unintuitive. While wrangling my config.toml file (to change blog appearance), I experienced merge conflicts between my local files and my GitHub repo, and had no idea what to do. So, in the ultimate paradox of things, I was on a version control site wrestling against verson control paramaters. But I got my blog up and I’m very happy with the end result. I know that I can easily avoid future frustrations simply by learning about GitHub. Secondly, if I ever want to switch a layout, well, switching Hugo Themes seems very easy.
Yeah, I’ve seen lots of complaints about blogdown already. But, the best thing is that when you use it, you won’t ever have to manually update a blog again and you can simply stay in R, where the action is.
Next – I should probably migrate my old posts from the WordPress grave.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.