I have been using Jekyll Blog platform for two years and have been using the most popular and well-maintained theme
minimal mistakes in this blog.
Although I have always used the blog repository via
github-pages, recently, I wanted to test some issues by running a site in the local machine.
Therefore, in this tutorial, I will show you how to run a Jekyll blog in your local machine. In this example, I will show how to use the
minimal mistakes theme.
- Ruby version 2.5.0 or higher, including all development headers (check your Ruby version using
- RubyGems (check your Gems version using
- GCC and Make (check versions using
g++ -v, and
If the prerequisites are not installed on your system, just install them first.
Once you have the prerequisites, install
gem install jekyll bundler
Now, let’s create a directory which will serve as our blog directory.
mkdir newblog jekyll new newblog cd newblog
After going to the directory, let’s run the following:
bundle exec jekyll serve
Now, you will be able to see your blog in the
http://127.0.0.1:4000/ address on your browser.
Install Minimal Mistakes
Copy following contents to the
source "https://rubygems.org" # Hello! This is where you manage which Jekyll version is used to run. # When you want to use a different version, change it below, save the # file and run `bundle install`. Run Jekyll with `bundle exec`, like so: # # bundle exec jekyll serve # # This will help ensure the proper Jekyll version is running. # Happy Jekylling! # gem "github-pages", group: :jekyll_plugins # To upgrade, run `bundle update`. gem "github-pages", group: :jekyll_plugins gem "minimal-mistakes-jekyll" # The following plugins are automatically loaded by the theme-gem: # gem "jekyll-paginate" # gem "jekyll-sitemap" # gem "jekyll-gist" # gem "jekyll-feed" # gem "jekyll-include-cache" # # If you have any other plugins, put them here! # Cf. https://jekyllrb.com/docs/plugins/installation/ group :jekyll_plugins do end
Then run the following command
$ bundle install
Now, again run the following:
bundle exec jekyll serve
That’s all! Cheers!!!
Related Posts on Jekyll/ Minimal Mistakes
- Google Adsense in Jekyll Static Site or Minimal Mistakes Blog Theme
- Google Analytics in Minimal Mistakes Blog Theme
- How to Enable Facebook Comments Plugin in Jekyll Blog Posts
- Minimal Mistakes Cheat Sheet: Code Snippets I use to Blog using Jekyll and the Minimal Mistakes Theme
- Jekyll SEO: How to Find and Fix 404 Error on a Jekyll (Minimal Mistakes) Blog Website
- Medium: How to Effectively Perform Search Engine Optimization to a Jekyll (Minimal Mistakes) Blog Post Header
- How to Add Latex Math to Jekyll-based Theme- Minimal Mistakes
- Tools and Platforms I use for Blogging