BlogGen Lives

November 14, 2015

I posted in March about hoping to post more often to my blog. In what’s probably a bit of self-serving bias, I laid the blame on my tools:

The trouble is friction. The amount of ceremony to post an article or share a file is just too high.

To overcome that friction, I’ve spent some of my free time over the intervening seven and a half months developing my own static blog generator, BlogGen. This was a fun excuse to learn more about css, templates, web fonts, Swift, Ruby, pygments, CentOS, and Nginx.


Now that I’m ready to point my DNS records at the new site, revisiting the requirements from my March post seems like an interesting exercise. It’ll serve as a little postmortem on my BlogGen project.

Write in Markdown with Code Syntax Highlighting

I ended up using github flavored markdown as expected. I wrapped a Ruby script around redcarpet and pygments.rb to process markdown input into HTML with nice syntax highlighting of code. I’m also using Gruber’s to get the quotation marks right. I suppose every site should have a little bit of perl.

One Button Posting

I started BlogGen as a command-line utility, but ended up bundling that code inside a little Mac app. One click in the app generates the site and rsyncs it to my web server. There’s also the option to just generate the site locally—useful for testing changes that go beyond simple posts.

Static Project Pages

Besides just processing markdown, I discovered that I wanted a basic templating engine. Never one to do the rationale thing, rather than adopting an existing system, I built my own for BlogGen. It’s dead simple. Input files for the site have a little key-value definition section at the top, followed by the markdown content. Here’s the start of the file for my About page:

title: About
subtitle: just this guy, you know
slug: about
I'm a software developer for the [Omni Group](

Each sort of page, currently just static pages and posts, have their own template file. The template files for static pages looks like this:

<!DOCTYPE html>
    <title>{{title}}— </title>
    {{include headElementContents}}
{{include header}}
<div id="columns">
    <div id="sidebar-column">
        {{include sidebar}}
    <div id="main-column">
        <div class="post-header">
            <div class="subtitle">
        <div id="footer">
            <div id="narrow-footer-bits">
                {{include sidebar}}
            Copyright © 2010–{{include currentyear}}, Curtis Clifton 

The input markdown file for every static page on the site is run through that template. BlogGen replaces the stuff in double braces when generating each page.

RSS Feed Generation

My home page shows the five most recent posts. To generate that I use a summary template. That mechanism also generates my RSS feed.

While a regular template just has a single section that it uses to generate each page or post, a summary template has three sections. For example, here’s the summary template that generates my RSS feed:

fileName: feed.xml
  <guid isPermaLink="true">{{filePath}}</guid>
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
 <description>Posts and announcements from</description>

The first section gives the summary output file name and, optionally, the number of posts to include in the summary. The second section gives the format for an individual post within the summary and is just like a regular template. The final section gives the format for the summary output as a whole. Within this section the special keyword {{summary}} is replaced with the result of running every post through the preceding section.

Minimum Server Fuss

In March I wrote, “I think I’d like to be able to run code on the server, but I’d also like to have someone make sure all the latest security patches are installed for me.”

I caved a bit on this one. For now, I don’t run any code on the server. I’m running a virtual machine with Digital Ocean configured with CentOS 7 and running Nginx. The server accepts http connections and only vends static files. Apart from http, the server accepts ssh connections, but only with key-based authentication. I’m hopeful that this simplicity will mean maintenance is just a matter of running occasional updates.

For now I’m thrilled with how easy, cheap, and fun it’s been using Digital Ocean. If you decide to check them out, use this link to throw some referal love to my friend Jared who introduced me to Digital Ocean.

Custom Domain

With Digital Ocean, it was just a matter of updating my DNS records with my domain name provider to point at my server. I use Hover and couldn’t be happier.

Was It Worth It?

I’ve had lots of fun on this little side project, so even if I don’t post more often, I think BlogGen was a good use of my time. That said, I have more sense of ownership in my site now and feel like I probably will post more. We’ll see. (Porting my existing content from Square Space, I realized that I have a bad habit of promising future posts and not delivering. I’ve resolved not to do that any more.)

The one significant drawback of my current system is that it doesn’t support posting or editing from iOS. Knowing myself, there’s a chance I’ll decide to port BlogGen to iOS. If I don’t post again here for another seven and a half months, you can guess what I’m doing.

CocoaConf PDX

May 10, 2015

Yesterday I had the privilege to speak at CocoaConf PDX. I reprised my Seattle Xcoders talk on developing apps for Apple Watch using WatchKit 1.0. I updated the talk with some lessons learned since the Watch shipped.

Here are the slides for the updated talk.

I’ve also updated the source for the sample app that I developed for the talk. There are still a few to-do items left in the source, but hopefully it’s of use as is.

Overcoming Blogging Friction

March 1, 2015

I’d like to post more, but I’m afraid that my current web host gets in the way of that.

This site is hosted on Square Space, and has been since I moved my web presence from Rose-Hulman in a hasty transfer back in 2011. I’ve been pleased to have Square Space manage all the details of keeping the site up, staying on top of security updates, and generally handling all the sys admin work for me.

The trouble is friction. The amount of ceremony to post an article or share a file is just too high.

I write in markdown using BBEdit on my Mac. To post an article to Square Space, I have to upload any images through a point-and-click file upload interface. Then I get the links for the images through some more clicking and copying. I update the post on my Mac with the image links. Then I click some more on the web site to create a new article. Finally, I copy the markdown source of the article into a text form on Square Space. Any updates to the article require a similar series of hoop jumping.

So, inspired by my colleague’s posts last fall, I’m starting to re-think my approach to this site. Unlike Brent, I need everything from hosting on up.


Whatever system I choose, it needs to meet a few requirements:


There are a few other features that I think would be cool:

Roll My Own?

I’m not averse to rolling my own system, though I’m more comfortable writing code than configuring servers. Still, something like Marco Arment’s Second Crack or Brent’s system appeal to my engineering sensibilities—clean, simple, and to the point.

Does meet my requirements? I’ve poked around their site, but they sure don’t want to tell me what’s possible. They just want to shout about how easy their system is to use. I’m afraid their “easy” is the kind of friction I’m trying to escape.

So, what’s the answer? Who should I be considering for hosting? What tools should I use for publishing? Suggestions? Let me know!

Export OmniFocus View to OmniOutliner

February 22, 2015

My Export View to OmniOutliner script makes a new OmniOutliner document from your current view in OmniFocus.

I’ve been meaning to share this handy little script for quite awhile now. Tim Stringer gave me the nudge I needed with his excellent work at Learn Omnifocus. Tim has a great new video tutorial (members only) on using FastScripts to quickly launch scripts to automate OmniFocus.

Installing the Script

To install the script, download the latest version here. Then in OmniFocus, choose Help → Open Scripts Folder. Drag the Export View to OmniOutliner file into the scripts folder. Finally, use Customize Toolbar to add the script to the toolbar in OmniFocus.

Running the Script

Once you’ve installed the script, navigate to whatever perspective you’d like to export. You can even Focus on a particular project, or use View Options (⇧⌘V) to fine tune the display. Once the view in OmniFocus is showing just what you want, run Export View to OmniOutliner from your OmniFocus toolbar. OmniOutliner will launch and the script will create a new document containing just the information in your current OmniFocus view.

Only the titles, notes, and structure are exported from OmniFocus. The OmniOutliner document won’t contain contexts or other information, like defer and due dates, from OmniFocus. I find this is a handy way to get a summary of a project or a task list into OmniOutliner. From there, I can print to PDF to share with others without exposing the details of my own OmniFocus database.

Share and enjoy!

Drop me a note @curtclifton on Twitter if there’s something else you’d like to see automated in OmniFocus.

Developing with WatchKit 1.0

January 9, 2015

Last night I had the privilege to speak at the Seattle Xcoders monthly meeting. I talked about developing apps for Apple Watch using WatchKit 1.0. It was great fun to collaborate with David Hoang, who spoke on Designing for Apple Watch.

Here are the slides for my talk.

I’ve also posted the source for the sample app that I developed for the talk. There are still a few to-do items left in the source, but hopefully it’s of some use as is.

Updated January 13, 2015

Videos for David’s talk and mine are now available.