Why on earth would you use Jekyll for education blogging?

29 September 2013

Why on earth would you use Jekyll for education blogging?

I recently posted about the use of Markdown for learning materials, and what I perceive as its advantages. A topic related to Markdown are static blogs such as Jekyll, since Jekyll allows users to write in Markdown. My goal here is to report on my experience with Jekyll, as I haven't really tested much other platforms.

First and foremost, if you are working on Jekyll without support from a front-end programmer, you'd better know some HTML, CSS, and Javascript, otherwise you will either get stuck or will be significantly limited in what you can do. My abilities with these programming languages are fairly limited, and so I can introduce small modifications to existing code, but am not anywhere near being a knowledgeable about them. What this means in practice is that my main strategy to learn Jekyll is to look at what others have done with their blogs, and GitHub has tons of examples, and then steal chunks of code from each of them. An essential point here is to test locally, which is pretty easy to do with Jekyll. This means I can grab the documentation or any random piece of code and check what it does within a matter of seconds. For the geek crowd, this is probably the single most interesting aspect of Jekyll, as even though I am no CSS/HTML/JS programmer, I can start learning in practice.

But now you might be asking what is it that Jekyll can do that you can't get accomplished with WordPress, Blogger, Tumblr and the like? Well, if you are good you can probably do anything with any platform, including the items that will follow. But here is what I see as advantages on my own workflow, bearing in mind that some of these items will repeat what I included in my previous post about Markdown, but now in a context specific to blog posts:

  1. Regular Expressions - since my drafts and posts are all written in markdown stored in a local directory, while writing a post I am constantly searching them. For example, have I written about that topic before, am I repeating myself, did I have previous notes on another draft that I could merge here? Regular expressions are a fantastic way to search across files, and having them in text is a big plus since I can manipulate them with Sublime Text very easily. In my specific case this is specially helpful since I tend to take a ton of notes for future posts, right now with 309 drafts ranging from single lines to drafts only missing a few things before being ready to go out.
  2. Versioning - my whole blog is versioned on Github, which first and foremost means that I don't have to worry about losing anything if my computer crashes. The other advantage is that I will often refer people to my draft posts on github and ask for feedback before I get the final version out.
  3. R Markdown - I am currently preparing a series of posts about lifelong learning based on very large data sets in education, and here is probably where Jekyll shines. Simply put, I can use R Markdown to directly connect my posts to my data an then make use of some of the fantastic graphic packages in R such as rCharts, googleVis, ggplot2, among others. Like in reproducible research articles, this is specially good since I can update my blog posts on the fly, meaning that i can just add or correct an analysis and the changes are immediately online.
  4. Semantic citations - I haven't started using CiTO yet, but will likely start in the next few weeks. In nutshell, the idea is to use Carl Boettiger's knitcitations and Tyler Rinker's reports packages so that my links to citations can be connected to a wide range of information on that reference. For example, while citing a paper on clinical trial my link could also contain information on a related database such as ClinicalTrials.gov, all using the concept of Linked Open Data. More on this in the future ...
  5. Reuse - this happens to me almost every day, where I will grab text from one of my previous reports, papers, or slides, and then just throw bits and pieces it in a blog post. The format is identical across them, and so there is no hassle. Of course, I am making extensive use of simple search or Regular Expressions here.
  6. Translation - I just started what I hope will become a series of bilingual posts in English and Portuguese, which are then linked to language-specific Facebook group pages for researchers around the world. My workflow is then to write in English first, throw my text file on Google Translator Toolkit, edit whatever the automatic translation might have gotten wrong, and I am literally done within a few minutes. Here again, having a blog post in Markdown makes it real fast and effective
  7. No backend database - here the argument is that a static site is safer since there is no way for the blog to be attacked through a SQL injection. While I think that the odds of somebody wanting to hack my blog are pretty remote - hey, the whole content is github, just fork it - for me this is more of a theoretical advantage.

So, just to restate what I said before, I am not claiming that any the items above cannot be included in a different workflow using one of the simpler blogging platforms. Hey, different folks different strokes, and Jekyll simply works for me ... at least until I find something cooler.

by Ricardo Pietrobon