16 May 2018

Working With Jekyll and Github Pages

by aaroneg


Basic Jekyll / Github Pages operation is pretty simple if you want to use the ‘out of box’ stuff. The moment you begin wanting to customize things is where you run into trouble. So far it’s been a fun project, but there are some things that I skimmed over in the documentation that I probably should have stopped and read closer.

Choosing a theme

I wanted to use the ‘hacker’ theme, not because I feel like I’m some sort of amazing ‘hacker’ person, nor do I pretend to be an expert on most things. It’s just the best (in my opinion) theme supported by Github Pages out of the box. I like dark themes because even though there’s plenty of sunlight in all of the places I’m sitting at a computer reading things, when it’s night or overcast outside there are few things more annoying than a bright white light in my eyes.

Github provides a small assortment of supported themes.

Customizing your theme and site pages

You’ll need to ensure your site has the following folders to continue:


Acquire the layouts from your theme

The reason you can begin without a _layouts folder is, github does some magic and pulls those in from your chosen theme. To begin, find the github repo for the theme and browse to it’s _layouts folder.

These are the source of your layouts if you’ve never added your own. They’re also the place you should start, if you want to tweak a few things but still want it to be properly themed. Copy the layouts from the theme into your _layouts folder.

I wanted to change the site title from the repository name to the name of my domain. I also wanted to get rid of the prominent placement of github badges and add an edit link to all of my posts so a visitor could see the source for the pages.

Make the changes you’d like

Here’s the commit I made to do most of the things referenced in this post. a5879c2


tags: jekyll - rage - github - github-pages

This site is open source. Improve this page