<-- home

Up and Running with Jekyll

A few weeks ago I got the idea of starting my own blog. Not to Build My Brand™, but because I like data science. That sentence might sound a bit unfinished, but it’s true! I like communicating cool data insights, which involves writing (and some other stuff, but usually at least some writing). Starting a blog is cool because it lets you learn about web development (if you want) and (I imagine) gives you something to talk about at dinner parties.

This post will deal with the basics of setting up a static site in Jekyll. Be on the lookout for subsequent parts where we cover nice-to-haves like Google Analytics and SEO. In the meantime, let’s start with the basics.

Standing on the shoulders of giants

Rather than start from scratch (which surely would’ve been a steep descent into madness), I got some advice from web-aware friends and settled on Jekyll, which is a static site generator that plays nice with GitHub pages and effectively abstracts away tons of the work behind setting up a web server, getting a URL, etc. Note that there are tons of other static site generators, like

I went with Jekyll for the (reported) ease of hosting static and dynamic R Markdown notebooks along with the R community’s general support for Jekyll. If you want to just give Jekyll a try, keep reading—we’ll go over setting up a basic website in simple steps. Without further ado, let’s get to it.

From 0 to 1

Your best bet is to follow the super simple instructions on the Jekyll homepage. I’ve commented what each command is doing for ultra noobs like myself:

# Run lines prefaced with `$` in your terminal

# Or, `sudo gem install jekyll bundler`
~ $ gem install jekyll bundler

# Change 'blog' to whatever you'd like!
~ $ jekyll new blog

# Putting it all together!
~ $ cd blog
~/blog $ bundle exec jekyll serve

Neat! If you’ve made it this far, know that following those four commands took me the better part of an hour. Now if you open up your browser (usually Safari or Google Chrome) and enter ‘localhost:4000’ as your URL, you should see the default Jekyll layout and theme. If so, congratulations! You’re on your way to Internet now, kinda.

In the next few parts of this ‘series’ we’ll go over applying a nifty theme, adding new blog entries, and hosting our site on GitHub pages! Sounds like a good ol’ time :)


Thanks for reading! Feel free to head back or get in touch on Twitter! 🐙