Hello, from wordpress

Hello, from wordpress

Intro

I’ve been using blogspot to host my blog for 7 years now. The last couple of years I am not actively blogging. One of the reasons, is that it feels a little bit painful to do so, and the outcome has an ‘old’ and ‘crusty’ feel. So I’ve decided to move to a wordpress blog, so that I can explore new tooling that will hopefully make blogging easier and also will improve the looks.

So, this is a Hello World post from my new blog!

Migration process

For the migration process I followed this guide. In short the idea is that you:

export the blog in xml

Go to settings -> other -> backup content

import the blog in wordpress

Go to tools -> import -> blogger

Where did my gists go?

My preferred way of displaying code snippets has been through https://gist.github.com. In my old blog this worked by pasting the embed link that gist provides, into the html of your blog (yuk!). It seems that even though all of these gists were properly exported, they never made it into the new blog.

Since, I decided to use oEmbed Gist, which just requires you to paste the gist url as plain text, I decided to transform all of my

<script src="https://gist/github.com/foobarbaz.js"></script>

to

https://gist.github.com/foobarbaz

Since I am using spacemacs (in evil mode) as my text editor, I used a vi command that looks like:

%s/&lt;script\ src="https:\/\/gist\.github.com\/\(\w+\)\.js"&gt;&lt;\/script&gt;/\n\nhttps:\/\/gist\.github.com\/\1\n\n/g

This worked like a charm! I re imported the modified version of the xml to word press and et voild!

Blogging tools

This post also serves the purpose of trying out a pair of tools:

spacemacs

I’ve been looking for ages for a text editor that I can use along with my IDE. Over the years I’ve tried TextMate, SublimeText, Atom… Now, I really liked Atom, but I also wanted that editor to be also usable from my command line (via EDITOR and VISUAL). This brings down my choices to:

  • vim
  • emacs

Emacs always seemed impossible to use and I never got to learn vim that good, to be really productive with it. Spacemacs seems to be the best of both worlds and I’ve been enjoying using it the last couple of months.

org2blog

org2blog is a great plugin, that allows you to write using the org-mode (org-mode is the gateway drug to emacs btw) and then publish it to wordpress.

Using,  spacemacs along with org2blog  is such a great combo. It makes it really easy to write, add code snippets and publish.

Closing Thoughts

I hope that now that I have new setup in place, that looks great and its more fun to write, I’ll start blogging more often again!