Blogging in Emacs using Nikola
This blog is setup using emacs, orgmode(part of emacs), anaconda – for virtual environment, nikola and github – for hosting your blog. This post will take you through the steps that I've followed in order to get this blog that you are currently reading up and running from an Ubuntu machine. This is part of an exercise to write more frequently on this blog inspired by Sacha's guide on how-to.
After having our emacs and orgmode setup just to your liking, move forward by installing anaconda – a virtual environment manager.
To get the latest version of anaconda distribution, see instructions on the anaconda downloads page.
After installing anaconda, create a new virtual environment by typing in the following commands in your terminal.
# Create a virtual environment using '-n <name>', here blog. $ conda create -n blog python=3
Setting up Github pages
We need a place for a blog on the web. Github has an amazingly easy way to publish your website using github-pages. All we need to do is create an empty repository in your account like <username>.github.io. This is going to be the address of your new blog and you can find more on how this works on github-pages.
Go through 'Github pages' part from this blog post to create one.
Installing Nikola in anaconda environment
After setting up the github page repository for your blog, install nikola so that you can publish it right from your terminal.
# Activate the conda virtual environment 'blog' created earlier $ source activate blog # Install nikola using pip (blog)$ pip install --upgrade pip 'Nikola[extras]'
Using nikola and blogging
Now that we have nikola installed in anaconda virtual environment, we can start using nikola and orgmode to create our first blog post and publish it on the internet.
Just follow the above post, from 'Site creation' right through to the end to use nikola, install a theme for your blog, check if all looks good on your local machine and publish it onto your github-pages.
It would be great to activate conda virtual environment, open an orgmode buffer in emacs, write the post & publish the blog via keybindings-hook from inside of emacs once a post looks good. I've seen a couple of ways to do this and would like to implement them into my blogging setup in the future.