Skip to content

Instantly share code, notes, and snippets.

@widdowquinn
Created December 19, 2017 17:56
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save widdowquinn/f255783f826f358f5de97186131419a9 to your computer and use it in GitHub Desktop.
Save widdowquinn/f255783f826f358f5de97186131419a9 to your computer and use it in GitHub Desktop.
Create a Jekyll blog on GitHub Pages, using the Minimal-Mistakes Theme

Creating a Jekyll blog on GitHub Pages with Minimal-Mistakes

Setup

First, create a new Jekyll site and corresponding GitHub Pages repository, then test it locally at http://localhost:4000:

$ gem install jekyll bundler
$ jekyll new <REPO>/
Running bundle install in /Users/<USER>/Development/GitHub/<REPO>... 
$ cd <REPO>/
$ bundle exec jekyll serve

Push the site to the GitHub Pages repository

$ git init
$ git add .
$ git commit
$ git remote add origin git@github.com:<GITHUBUSER>/<REPO>.git
$ git push -u origin master

To use the Minimal-Mistakes theme, edit the Gemfile and _config.yml files:

diff --git a/Gemfile b/Gemfile
index 32de02c..ffe96ce 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,7 +8,9 @@ source "https://rubygems.org"
 #
 # This will help ensure the proper Jekyll version is running.
 # Happy Jekylling!
-gem "jekyll", "~> 3.6.2"
+#gem "jekyll", "~> 3.6.2"
+gem "github-pages", group: :jekyll_plugins
+gem "jekyll-remote-theme"
 
 # This is the default theme for new Jekyll sites. You may change this to anything you like.
 gem "minima", "~> 2.0"
@@ -25,3 +27,5 @@ end
 # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
 gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
 
+# Try the Minimal Mistakes theme
+gem "minimal-mistakes-jekyll"
diff --git a/_config.yml b/_config.yml
index f91333e..6d8f5e4 100644
--- a/_config.yml
+++ b/_config.yml
@@ -26,9 +26,11 @@ github_username:  jekyll
 
 # Build settings
 markdown: kramdown
-theme: minima
+theme: minimal-mistakes-jekyll
+remote_theme: "mmistakes/minimal-mistakes"
 plugins:
   - jekyll-feed
+  - jekyll-remote-theme
 
 # Exclude from processing.
 # The following items will not be processed, by default. Create a custom list

Update the Ruby bundle and test the site locally:

$ bundle update
$ bundle exec jekyll serve

Commit the changes, then push the site to the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment