Tutorial

Jekyll Themes

Published on July 28, 2016
Default avatar

By Alligator.io

Jekyll Themes

While we believe that this content benefits our community, we have not yet thoroughly reviewed it. If you have any suggestions for improvements, please let us know by clicking the “report an issue“ button at the bottom of the tutorial.

As of Jekyll v3.2, themes are a first-class citizen in Jekyll. This means that theme designers can create Jekyll themes that are bundled as RubyGems and are properly versionable and updatable. This is a great move to foster a better theme ecosystem in Jekyll and make life easier for both theme designers and website creators.

Right now themes only support layout, include and Sass files, but the plan is to also support other theme assets in future releases. Themes need to be bundled as RubyGems, so the RubyGems website will be a good place to find themes and follow the latest updates.

Installing a theme

Add the theme by its name to your Gemfile:

gem 'theme-name'

You can have multiple themes in your Gemfile

Then add the theme in your _config.yml file:

theme: theme-name

Only one theme should be used in your _config.yml however.

Themes are also required to include a README file, which should be useful to learn the specifics of each theme.

Updating a theme

As themes are now bundled as Rubygems, updating when there’s a new version is now as easy as updating the gem:

gem update theme-name

Or, if you’re using bundler:

bundler update theme-name

Overwriting files

Jekyll will first look if it can find a version of any file in your Jekyll project before using the theme’s version of the same file. This means that you can overwrite any theme file simply by creating a file with the same name in your project.

Shiny new toy

As of this writing, Jekyll 3.2 is just released and only a few themes are available as Rubygems. Minima and Garth are two examples. Let’s hope for plenty more in the very near future!

Let’s also hope that the main Jekyll theme directory websites catch up on the change quickly.

Read more

Read the official docs for Jekyll themes for more details and to learn how to create and bundle your own themes.

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about us


About the authors
Default avatar
Alligator.io

author

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
 
Leave a comment


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel