1 Blog in Org2jekyll - 2. Configuring all software

This post is part 2 of a short series about writing in org mode, specifically using org2jekyll to write a blog in org mode and jekyll.

Here I describe how I configured the environment used for this site and blog https://mzimmerm.github.io.

The motivation for using https://github.io was to setup environment which is:

  • Hosted (I do not need to manage the web server etc)
  • Allows to write pages and blog posts in org mode
  • The platform should allow more control than Blogspot or Google Sites (judged at my limited familiarity level with the two)

The environment I decided to use is hosted by github.io (which uses Jekyll as website builder), with Jekyll theme jekyll clean, and allows writing in org-mode, using org2jekyll.

There is a lack of liveliness in my selected "web publishing environment". I should use to use other more lively systems for blogging, such as https://github.com/LivelyKernel. But there is the intersection of practicality and what I think is the future.

So for now, this is this blog stack:

Below is a quick summary of setup steps that achieved installation of this block software stack.

  1. Setup Github Pages on github.io: I created my github page at github.io, and cloned it to my local directory, BLOG=\~/mzimmerm.github.io . This step is best described in https://pages.github.com/. The end result of this step was a local directory, synchronized with my repo at https://github.com/mzimmerm/mzimmerm.github.io. It only contained index.html.
  2. Setup Jekyll with theme jekyll clean: Next I decided to use a particular Jekyll theme I liked from github, the jekyll clean theme. To this goal,
    • I overwrote the contents of my local $BLOG by going to https://github.com/scotte/jekyll-clean, selecting "clone or download", then "download", and unzipped the downloaded zip into $BLOG.
    • Also, I created a new directory org in $BLOG. In this directory, I am writing my posts in org mode. This is needed for Org2jekyll - see next step
  3. Setup org2jekyll in Emacs: As I decided Org2jekyll is the best environment for Org mode and Jekyll, I did
    • Run M-x package-list-packages from emacs, which installed Org2jekyll in my Emacs from Emacs package manager (alternatively, you can download and install the files from https://github.com/ardumont/org2jekyll). Using the emacs package manager is easier.
  4. Configure org2jekyll in init.el: Emacs need to be customized to "know" about the "source" directory where you write posts in Org, and the "target" directories where org publishes them
    • In init.el, add a section similar to this: https://github.com/ardumont/org2jekyll#setup.
    • The important step of the setup is to "get the directories right". We only need to change three custom-set variables. Here are notes on how to do it:
      • The org2jekyll-source-directory points to the "source" directory where posts are created in org format - this should be the full path to the org directory.
      • The org2jekyll-jekyll-directory points to the "target" location where org publishes. This should be the top level of the blog, $BLOG.
      • The org2jekyll-blog-author is the author name.

1.1 Notes

  • The Jekyll theme I use, is created by the "legacy method" - it is a plain directory tree with files. More recent themes are created as a Ruby Gem. My overall theme preference would be the theme used by Org2Jekyll in https://github.com/ardumont/org2jekyll which uses the Gem method but I was unable to build it. Ruby configuration is convoluted, even with RVM.
  • On OpenSUSE recent versions (2018 and later) Ruby is installed. To install Jekyll related packages, run
    • $ zypper in ruby2.7-rubygem-jekyll ruby2.7-rubygem-jekyll-watch ruby2.7-rubygem-jekyll-sass-converter

1.2 Conclusion

Configuring the environment used for this site and blog https://mzimmerm.github.io took Step 1 - 4 described above.