Katja Hofmann by katja-hofmann


Katja Hofmann

Researcher at Microsoft Research Cambridge, UK

About

External Links

DBLP

GitHub

Twitter

Importing WordPress Content in Jekyll

I’d like to keep some of the content from my WordPress page. Luckily, there is a Jekyll importer that can convert content. It does require a local installation of Jekyll, so let’s set that up first.

My setup: I’m running Bash on Ubuntu on Windows, so hopefully Ubuntu instructions will work without any changes. This is a blank slate, so let’s start with the basics. RubyGems installation instructions are from RubyGems on GitHub:

sudo apt-get install ruby-2.4 ruby2.4-dev
# install rubygems from source:
git clone git@github.com:rubygems/rubygems.git
cd rubygems/
git submodule update -\-init
sudo ruby setup.rb
sudo gem install jekyll

Next up is jekyll-import + WordPress specific dependencies:

sudo gem install jekyll-import
sudo gem install hpricot
sudo gem install open_uri_redirections

Now all that’s left is to follow the instructions from Jekyll Importer - WordPress.com. The result: my previous posts are converted and added under _posts. Let’s commit, push, and see the result.

Back to all posts