Yesterday I installed Org2blog, which allows me to write my blog posts in Emacs org-mode and push them to my WordPress blog from within Emacs. So far I like it a lot! One less reason to leave Emacs :-), and hopefully also a reason to blog more often. Other good things about keeping your blog posts in Emacs are:
You can simply export them to e.g. PDF. In my current setup it’s a easy as adding the line
somewhere at the top of the file (before the actual text of the post starts) to tell org-mode that it should use my personal LaTeX export style, followed by
C-c C-e l o and a nicely formatted PDF of my blog post pops up.
- You keep all your blog posts in plain text format, so if you would decide to change to a different blogging platform, uploading the old posts should be fairly easy.
Org2blog’s GitHub page mentions
C-c p as prefix key for Org2blog’s functions, but in my case this prefix is already used by Projectile, and looking in Org2blog’s Customize Group I noticed that
C-c M-p is an alternative prefix, so I’m using that to get the following functionality:
C-c M-p p
C-c M-p P
|post buffer as page and publish
C-c M-p d
|post buffer as draft
C-c M-p D
|post buffer as page draft
C-c M-p t
This is the Org2blog configuration in my
.emacs file (note that I’m using John Wiegley’s
;; Configure Org2blog, which allows me to write blog posts in org-mode
;; and then push them to my WordPress blog.
:default-title "New blog post"
Some links to pages I read before trying Org2blog
I don’t think this blog has any regular readers (especially since I’m not posting very regularly), but if they would exist they would have noticed two prominent changes in the last two days:
- the WordPress theme for the site has changed, and
- this blog now has several advertisements from Google’s AdSense programme.
Obviously, the two changes are tied together. From almost the first day of this blog’s existence I had been using the Carrington theme, and although I still like it a lot (including the fact that it has two columns on the left), its appearance on mobile devices was sub-par. To fix this I looked around for a theme with “responsive design” and the current one looks quite nice both on my desktop machines and on my phone.
Changing themes had been on my list for quite some time, but the reason that I took the time to actually do it was because of my idea to play around a bit with Google’s AdSense program. Apparently, Google likes it if a site looks well on all platforms. The main reason to add ads to this blog was to experiment a bit and simply to see if this is a viable way of recouping (some of) the costs associated with hosting this blog. I’ve got a decent number of monthly views (at least I think it’s decent and it’s definitely more than I expected when I started out) so why not give it a try. Moreover, since this is my personal, low profile site, it can also give me an idea if it’s worth having advertisements on some of the community sites that I run.
So, all in all, I think the theme change is definitely a good one, and about the ads, we’ll see. Maybe it works out, maybe it doesn’t. All in all I hope they don’t interfere too much with normal reading of the site.
Note to self: if you want to be able to upgrade WordPress via the web interface using SSH, you need to have the
libssh2-php package installed on Debian/Ubuntu Linux.
Don’t forget to restart Apache after installing the package. Reload the WordPress admin pages and you’ll see the SSH option added.