Getting Started with Jekyll - Common Theme Settings

In this post we’re going modify our chosen theme a bit, and make it feel more like home. 2016-10-07-Getting-started-with-Jekyll-Part-3

  1. Getting Started with Jekyll - Setting the Scene
  2. Getting Started with Jekyll - Finding a Theme
  3. Getting Started with Jekyll - Common Theme Settings <==
  4. Getting Started with Jekyll - Setting up Jekyll in Docker
  5. Getting Started with Jekyll - Learning Markdown and Liquid
  6. Getting Started with Jekyll - Modifying Templates
  7. Getting Started with Jekyll - Transitioning Content
  8. Getting Started with Jekyll - Launching your Site

_config.yml is your friend

Hopefully you’ve chosen a site that’s exactly what you wanted, and you’ve been able to fork it and clone it down. Now you’re just looking at a bunch of files that will produce someone elses site - not so cool. The first step to making it “yours” is to check out the _config.yml file.

The official documentation is pretty good in listing most values out, but this can be a bit overwhelming, so hopefully your theme’s _config.yml is well documented, like the below example from my blog:

# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely need to edit after that.
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.

encoding: utf-8
timezone: UTC

# Site settings
title: Pat Hermens
email: [email protected]
description: > # this means to ignore newlines until "baseurl:"
  This description will appear in Google search results,
  and in the meta-data of your site, so make sure you
  type up something short that defines you...

baseurl: "" # the subpath of your site, e.g. /blog
url: "http://hermens.com.au" # the base hostname & protocol for your site

# Social media usernames for filling out links:
twitter_username: phermens 
github_username: PHeonix25 

# Enable posting into the future
future: true

# Build settings
verbose: true
markdown: kramdown
kramdown:
  input: GFM

# Third-party services - just leave some empty to disable it
google_analytics: 
disqus_shortname: 

# used this for post_excerpt at index_page
excerpt_separator: <!--description-->
![2016-10-07-Getting-started-with-Jekyll-Part-3](/assets/headers/2016-10-07-Getting-started-with-Jekyll-Part-3.png)

Whoa, that’s a lot of config. What’s truly important?

I’d say (from my limited personal experience) that Jekyll has some great defaults, and the only settings you truly need to change are in the Site settings block above:

  • title: What do you want your site to be called?
  • description: Meta values for your social media sharing stuff
  • baseurl: Do you want to put the site in a subdirectory?
  • url: This is used with the baseurl above to find assets in themes.

Once those are set correctly, the rest has a lot to do with your site’s functionality. You can see from the above that mine came with Google Analytics, Disqus and some in-built links to my Twitter and GitHub accounts - yours may differ slightly, but I’m sure it’ll be straight-forward or predictable like the example above.

So I’ve provided defaults, what next?

We’ll get it up and running in Docker now so that you can preview your new site! Onward to Part 4!


I'm Pat Hermens, an Australian that's spent a decent amount of time living & working in the Netherlands.
I am a .NET developer (for the last 20 years or so), a technical manager, a public speaker, a happy husband and father, but most of all; I'm just a nerd.
I'm currently a Director of Software Engineering at Slalom Build in Sydney, Australia, and I was previously Development Manager at Coolblue in Rotterdam, NL.

Leave a comment

avatar