Migrating your Jekyll site to Netlify

Brian Douglas posted this on May 11, 2017

This guide was most recently updated on Thu, Dec 7th, 2017. Below are the package versions used:

Ruby: 2.4.2

Jekyll: 3.5.2

Note: screenshots may be outdated.

This post will cover how to move your Jekyll site from GitHub Pages to Netlify in just a few steps.

If you have generated your Jekyll site using GitHub pages or forked a template there is a good chance you do not have a Gemfile. This is because GitHub pages will infer dependencies for you. If you would like to build your project outside of GitHub a Gemfile is needed and simple to create.

In your GitHub repo create a new file with the name Gemfile and add the following content to it:

source "https://rubygems.org"

gem 'jekyll', '~> 3.5.2'

Since Netlify also needs to know what version of Ruby to run, put your version string in a file called /.ruby-version and we’ll use that version! If you don’t know, use version 2.4.2.

Once you have a Gemfile and a .ruby-version file, you can now connect your site to Netlify without issue.

Adding a new site with Git is not a requirement for adding a site, but it’s strongly recommend to take advantage of all of Netlify’s continuous deployment features.


Once your site is connected, you can find your Repository from the list GitHub repos. There is also a convenient search box in case you have more repositories than the page can fit.


Finally, you will just need to add the Jekyll build command and build location. For Jekyll that is jekyll build for the command and _site for the location.


You now have your Jekyll site on Netlify and can take advantage of some great features, like deploy previews and free custom domains with SSL.

This article has a good list of things to configure after you deploy your site.

If you made it this far and do not have a Jekyll site to try this out with, you can try out my Jekyll template.

Notice something is incorrect or outdated?

First off, great eye! We appreciate your discovery and want to ensure it gets addressed immediately. Please email us at support@netlify.com.

About Netlify

Netlify is an all-in-one platform for deploying and automating modern web projects.

Simply push and Netlify provides everything—servers, CDN, continuous delivery, HTTPS, staging environments, prerendering, asset post processing, DNS, and more.

Any project, big or small, can perform instantly on a global scale.

Don’t let your site be slow and vulnerable.