How to import a WordPress blog in Jekyll (macOS)

install jekyll-import and it’s dependencies

# install homebrew if not already installed
# /usr/bin/ruby -e "$(curl -fsSL"

brew install mysql
sudo gem install unidecode sequel mysql2 htmlentities hpricot open_uri_redirections 
sudo gem install jekyll-import

Export your WordPress site content (Dashboard > Tools > Export). Now import the downloaded file using the following command:

ruby -rubygems -e 'require "jekyll-import";{ 
    "source"    => "/Users/aamnah/tldrdevnotes.wordpress.2017-02-23.xml",

Make sure to update the source, it should have the location of your downloaded wordpress export file. You should something like below:

Downloading images for Sass: Creating a Color Palette
Imported 6 attachments
Imported 18 nav_menu_items
Imported 1 custom_csss
Imported 1 pages
Imported 73 posts